matlab help
@reemii
question?
%% 5.13 % In Problem 5.1, you created four plots. Combine these into one figure % with four subwindows, using the subplot function of MATLAB. x = linspace(1, 10); % first subplot y1 = exp(x); plot(x, y1); subplot(2, 2, 1); title('first subplot'); % second subplot y2 = sin(x); plot(x, y2); subplot(2, 2, 2); title('second suplot'); % third subplot a = 5; b = 2; c = 4; % defined variables y3 = a*x.^2 + b*x +c; plot(x, y3); subplot(2, 2, 3); title('third subplot'); % fourth subplot y4 = sqrt(x); plot(x, y4); subplot(2, 2, 4); title('fourth subplot');
waiting for @reemii unless you can answer my question in matlab
my fourth subplot show up but the graph in the subplot isn't displaying. I think it might be my x interval? I used a linspace() command and a vector command. I am not sure why it won't display.
according to this example (I googled https://www.dartmouth.edu/~rc/classes/matlab_graphics/Matlab-subplots.html ), you have to use the `plot` command after the `subplot` command.
so my fourth graph is plotting in the third subplot, but there is nothing displaying in the fourth subplot
Oh i see. I was looking at this http://www.mathworks.com/help/matlab/creating_plots/create-graph-with-subplots.html?requestedDomain=www.mathworks.com
I see let me try that
Join our real-time social learning platform and learn together with your friends!