Cody

Problem 816. Global usage

This Challenge is to utilize Global variables.

Global variables are risky as the subroutine may inadvertently and unwantingly update them. Globals also tend to slow execution time.

The Challenge is to implement and become aware of capability and risk.

The global variables in this Challenge are gOffset and global_x.

Given two input variables [a,b] output [gOffset+a global_x*b]

Input: [a,b] (Two real values)

Output: [gOffset+a global_x*b]

Related Challenge is Persistent.

Solution Stats

60.38% Correct | 39.62% Incorrect
Last solution submitted on Apr 14, 2016

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more