- #1
fball558
- 147
- 0
anyone know MATLAB?
Using Matlab, write an m-file that creates subplots of y=x^n for n=[1:6] and
x = [-10:0.01:10]. Each subplot needs appropriate labels in bold and using superscripts. this should also be commanded from within a loop and using num2str commands where necessary.
i started out with a nested for loop as followed.
for x = [-10:0.01:10]
for n=[1:6]
y=x^n
plot(y) trying to just graph what I am getting so far in the loop
end
end
when i run the program i get just a blank graph??
any help would be great!
Homework Statement
Using Matlab, write an m-file that creates subplots of y=x^n for n=[1:6] and
x = [-10:0.01:10]. Each subplot needs appropriate labels in bold and using superscripts. this should also be commanded from within a loop and using num2str commands where necessary.
The Attempt at a Solution
i started out with a nested for loop as followed.
for x = [-10:0.01:10]
for n=[1:6]
y=x^n
plot(y) trying to just graph what I am getting so far in the loop
end
end
when i run the program i get just a blank graph??
any help would be great!