Scripts with input and output, MATLAB Programming

Scripts with Input and output:

Placing all this together, we can implement the algorithm from the starting of this section. The following script computes and prints the area of a circle. At first it prompts the user for a radius, reads the radius, and then computes and prints the area of the circle based on this radius.

 

967_Scripts with Input and output.png

Executing the script generates the output as shown below:

>> script2

Now enter the radius: 3.9

For the circle with radius of 3.90, the area is 47.78

Note that the output from the first two assignment statements is suppressed by putting the semicolons at the end. That is often completed in scripts; therefore the exact format of what is displayed by the program is controlled by the fprintf functions.

Posted Date: 10/18/2012 5:57:02 AM | Location : United States







Related Discussions:- Scripts with input and output, Assignment Help, Ask Question on Scripts with input and output, Get Answer, Expert's Help, Scripts with input and output Discussions

Write discussion on Scripts with input and output
Your posts are moderated
Related Questions
Illustration of Input function: For illustration, >> rad = input('Enter the radius: ') Enter the radius: 5 rad = 5 If character or string input is preferred, 's' s


i am doing my project on matlab and the topic of my project is invisible watermarking.How we can extract all pixel values of image in binary form.

i want the MATLAB code for properties of refrigerant R134a, Pentane and VCR Refrigeration cycle. Thanks

Illustration of Function functions: For illustration, to pass the sin function into fplot, one would pass its handle as shown in figure for the result.   >> fplot(@s


i want to extract an image from its background in matlab..the image is a binary image

I need this task to be done with discription of matlab coding.

i need someone to write a matlab code to solve a model.