- #1

DryRun

Gold Member

- 838

- 4

## Main Question or Discussion Point

Hi

I just started a course in learning how to use matlab and i'm asked to begin by writing some scripts.

This is the problem: A set of independent voltage measurements taken by four observers are recorded. Create a script that prompts the user to input the values of the readings and calculates the average voltage and its range of error.

Here is my script:

m1 = input ('Enter first value of voltage ');

m2 = input ('Enter second value of voltage ');

m3 = input ('Enter third value of voltage ');

m4 = input ('Enter fourth value of voltage ');

sum = m1 + m2 + m3 + m4;

average = sum/4

I know it's incomplete and maybe even incorrect, but i have no idea what to do.

I just started a course in learning how to use matlab and i'm asked to begin by writing some scripts.

This is the problem: A set of independent voltage measurements taken by four observers are recorded. Create a script that prompts the user to input the values of the readings and calculates the average voltage and its range of error.

Here is my script:

m1 = input ('Enter first value of voltage ');

m2 = input ('Enter second value of voltage ');

m3 = input ('Enter third value of voltage ');

m4 = input ('Enter fourth value of voltage ');

sum = m1 + m2 + m3 + m4;

average = sum/4

I know it's incomplete and maybe even incorrect, but i have no idea what to do.