Program Elements: Matlab - PowerPoint PPT Presentation

1 / 2
About This Presentation
Title:

Program Elements: Matlab

Description:

Title: Program Elements: Matlab Author: Asad Azemi Last modified by: Asad Azemi Created Date: 5/14/2006 10:04:30 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 3
Provided by: Asad164
Category:

less

Transcript and Presenter's Notes

Title: Program Elements: Matlab


1
Program ElementsMatlab
  • CMPSC 201

2

file name circle.m programmer
name Joe Matlab partner name Tom Java date
created 8/28/07 date of last revision
8/28/07 details of the revision none short
description Calculating the area of a
circle
program description this is
intended for the user disp ('This program will
calculate and display the area of a circle.')
list of variables used with a short
description radius will be used to store
radius pi3.14156 is an internally defined
variable in Matlab area will be used to store
the calculated value of the circles area
Variable initialization radiusinput('Please
enter a value for the radiusgtgt ')
Calculation areapiradiusradius Displaying
the result fprintf('The area of the circle with
radius 0.2f is 0.2f \n',radius,
area) sample run appended from the Matlab's
Command Window This program will calculate and
display the area of a circle. Please enter a
value for the radiusgtgt 10.1 The area of the
circle with radius 10.10 is 320.47
Write a Comment
User Comments (0)
About PowerShow.com