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

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.

Tags

Problem Group

Solution Statistics

26 correct solutions 15 incorrect solutions
Last solution submitted on Jun 25, 2014