How to make three dimensional gragh
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
minsick
am 7 Apr. 2020
Bearbeitet: minsick
am 7 Apr. 2020
I am looking for make 3 dimensional graph with data file
There are three paramter (file name, x, y).
Could you share matlab code or example?
please find attached file
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282420/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Apr. 2020
Try this:
x = (1:10)';
y = [10 10 9 8 8 7 6 6 5 5;
9 8 7 6 6 5 4 4 4 4;
12 10 9 9 9 9 6 6 5 5]';
figure
hold all
for k = 1:size(y,2)
plot3(x, y(:,k), ones(size(x))*k)
end
hold off
grid on
xlabel('X')
ylabel('Y')
zlabel('Alt Number')
zlim([0 size(y,2)])
set(gca, 'ZTick',(0:size(y,2)), 'ZTickLabel',(0:size(y,2)))
view(-40,30)
Make appropriate changes to get the result you want.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Identification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!