make an array and plot grid

2 views (last 30 days)
virat rehani
virat rehani on 13 Nov 2015
Edited: Walter Roberson on 13 Nov 2015
Hi!
If I have
A=10;B=20; C=30; D=40; E=50; F=60;
How would I plot it in a grid of 3X3.
for i = 1:6
axh = subplot(3, 3, i);
plot(i);
end
for i = 1:6
grid((i),'on')
end
???

Answers (1)

Stalin Samuel
Stalin Samuel on 13 Nov 2015
Edited: Stalin Samuel on 13 Nov 2015
A=10;B=20; C=30; D=40; E=50; F=60;
data = [A B C D E F]
figure
for i = 1:6
subplot(3,3,i)
plot(data(i),'*','MarkerSize',15)
end

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!