Practice 1
Practice how to initialize/save/load the MATLAB variables and arrays
The following MATLAB statements plot the functionfor the range .
X=0::10;Y=2*exp(-*X);plot(X,Y);
Use the MATLAB Edit Window to create a new empty M-file, type these statements into the file, and save the file with the name , execute the program by typing the name test1 in mand Window. What result do you get?
Get help on the MATLAB function exp using:(a)The“help mand typed in mand Window, and (b)the Help Browser.
Use the mand to determine how to take the base-10 logarithm of a number in MATLAB.
Suppose that and .Evaluate the following expressions using MATLAB.
a.
b.
c.
d.
Use the MATLAB Help Browser to find out how to creat a new directory from within MATLAB. Then, create a new directory called mynewdir under the current directory. Add the new directory to the top of MATLAB’s path.
Change the current directory to mynewdir
MATLAB练习题1 来自淘豆网www.taodocs.com转载请标明出处.