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
Topic Develop a Web site that will provide information about your organization. The Web site will need to have a user-friendly interface for users to enter their information;

Write a program that repeatedly prompts for and reads a positive integer value n and then calculates and displays the nth Fibonacci number

Write a program to compute: 1.)    Mixing ratio, W=.622[Vapor pressure/(pressure-vapor pressure)] 2.)    Virtual temperature, VT=T(1+0.61 mixing ratio) = T(1+.61W) 3.)

Villa La Fourche Ltd is a small family business situated in the East Coast of Mauritius, more precisely Trou d'eau Douce.   The compound comprises of 6 independent villas, each of

Suppose L is a context-free language and L' is regular. Show that L∩ L' is a context- free language. Specifically, if you're given a PDA diagram of L and a DFA diagram for L' , des

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

#question.what. is cai? Explain its pitfalls .o

The classical connect-4 game is played on a 67 board, it can in fact be played in any nrRowsnrCols board. In your implementation, the user will specify the number of rows nrRows an

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim

Task .Task 1 Database design This task will allow you to demonstrate the following Learning Outcomes (LOs): LO 2. Justify the design and development of the application and critica