Discover MakerZone

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

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!

Problem 816. Global usage

Created by Richard Zapor

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.


Problem Group

Solution Statistics

31 correct solutions 18 incorrect solutions
Last solution submitted on Sep 06, 2015