Please write the code for following in MATLAB:
Matlab: Open a new script window under New on the toolbar. The window is blank. Write code that you want to execute more thanonce or that you do not want to do in the command window. A script has access to all the variables listed in the workspace. Save the file as Name.m Put the commands in the script window
a = poly([1 ‐1 4 6])
t=0:0.01:10;
q = polyval(a,t);
plot(t,q)
Save the script as Poly1.m In command
window
clear
Poly1
Run the program from the command window by typing Name
only.
Octave: procedure to create and run a script is the
same as described for MatLAB with this exception: the
script must be written in an ASCII text editor and saved
in a file that can be accessed by Octave. Notepad and
even Wordpad work on a PC, TextEdit on a Mac or a script
file can be created and saved as an m‐file in a
unix/linux command line window with pico or nano. The
Home Directory or My Documents can usually be accessed
by Octave.
Please write the code for following in MATLAB: Matlab: Open a new script window under New...