Write a script for explicitly display of values, Programming Languages

Write a script called 'prob1.m' that solves for the variables y, and z in terms of a user inputed x. The variables y and z are defined as follows:

y = x - 30                when 0 < x < 100

= 0.20*x + 800       when x > 100

= -50                   otherwise

z = -1                 when x < 0

=  0                   when x = 0

=  1                   when x > 0

Your script should prompt the user to input a value of x (use the input function). Next it should compute the values of y and z (surpress the output at first). Finally it should explicitly display the values of x, y, and z. From with the 'hw4.m' script call 'prob1.m'.

 

Posted Date: 3/22/2013 6:55:54 AM | Location : United States







Related Discussions:- Write a script for explicitly display of values, Assignment Help, Ask Question on Write a script for explicitly display of values, Get Answer, Expert's Help, Write a script for explicitly display of values Discussions

Write discussion on Write a script for explicitly display of values
Your posts are moderated
Related Questions
analyse the information need in the different functional area in any organization

how to make a program using vb?seriously i don''t know

1. use a small perl program and matching config file to retrieve and reformat the system time for a number of remote machines via snmp.  Readings should have a local timestamp for

Consider the following LP problem: min x 1 +3 x2 +x 3 -x 4 s.t. x 1 +x 2 +x 3 +x 4 ≥ 0 x 1 +x 2 -x 3 -x 4 ≥ 1 x 2 , x 3 ≥ 0 x 1 , x 4 ≤ 0. 1. Unique pr

Problem Solving 1. Write Pascal code that accepts as input the names of the students, course work score and exam score for a unspecified number of students who have taken a subjec

Please write a program declaring a variable x as the type int, and use the scanf function to input an integer to initialize the value of x. Then, your program will print the follow

Explain the Goto Statement - Computer Programming? The goto statement is employed to alter the normal sequence of program execution by transferring control to some other part o

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

I have a problem which seems to be quite a rare one and I can safely say I know what exactly what is causing it. After some process of elimination I reached the conclusion that, in

How to i write a car rental program in jgrasp