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
How to run java program?

The standard way for debuggers to plant interactive breakpoints in a program in RAM (whatever the processor instruction set) is to save the break pointed instruction and replace it

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

How to create an ER diagram?

Lexical Analyzer: Symbol Table - Holds the symbols accepted by the lexical analyzer or parser.  Each symbol may be a terminal or a non-terminal.  Terminal symbols are listed

W.A.S.S to find the factorial of a given number. Program # W.A.S.S to find the factorial of a given number.    echo -e "enter number:\c"            #  \c Suppress trailing n

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

Write a Perl script that prints the contents of a file Write a Perl script that prints the contents of a file, prefixing each line with a line number. The script should acc

While working in the eHealth Applied Research lab at Mohawk College, you are asked to transform an xml file into an XHTML representationusing XSLT for display in a browser.The xml

Draw the sequence diagram for the following scenario of eBroker. Sell Stock The user enters the username and password The system checks that the user is a valid user