Info
This question is closed. Reopen it to edit or answer.
3D graphic plot with specific data
1 view (last 30 days)
Show older comments
Hi Everbody,
I have got some datas and I want to plot datas as surface.
My datas are;for example:
Engine RPM: 120459 120219 120012 120012 120222 Engine Test No: 1 2 3 4 5 Engine Temprature: 300 500 350 450 315
How can I plot this datas as surface graphic with average apparent
0 Comments
Answers (1)
Star Strider
on 10 Oct 2014
I do not know what you mean by ‘average apparent’. This plots your data and an interpolated surface:
EngineRPM = [120459 120219 120012 120012 120222];
EngineTestNo = [1 2 3 4 5];
EngineTemprature = [300 500 350 450 315];
F = scatteredInterpolant(EngineRPM', EngineTestNo', EngineTemprature','natural')
xvct = linspace(min(EngineRPM'),max(EngineRPM'), 25);
yvct = linspace(min(EngineTestNo'),max(EngineTestNo'), 25);
[xq,yq] = meshgrid(xvct, yvct);
zq = F(xq,yq);
figure(1)
mesh(xq, yq, zq)
hold on
stem3(EngineRPM', EngineTestNo', EngineTemprature')
hold off
grid on
xlabel('EngineRPM')
ylabel('EngineTestNo')
zlabel('EngineTemprature')
I chose stem3 because with few data points it is easier to see where they are on the plot. The scatter3 function would work as well.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!