3D plot for repetitive data
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Isha Sharma
el 13 de Abr. de 2018
Comentada: Star Strider
el 18 de Abr. de 2018
I have 30 tables like the ones shown below with same e1 and e2 but different error. I am not sure what is the best way to show these results. I tired heat map but seems like its not possible since e1 has repetition. Can someone help me with this.
% e1 e2 error
[0.01, 0.01, 8.287423935;
0.01, 0.1, 8.430020284;
0.01, 0.5, 8.954563895;
0.1, 0.01, -1.004665314;
0.1, 0.1, -0.611359026;
0.1, 0.5, 0.094929006];
0 comentarios
Respuesta aceptada
Star Strider
el 14 de Abr. de 2018
your data are gridded, so you can use the reshape function to convert them to the necessary matrices to plot them with surf, mesh, or contour.
Try this:
e1e2er = [0.01, 0.01, 8.287423935;
0.01, 0.1, 8.430020284;
0.01, 0.5, 8.954563895;
0.1, 0.01, -1.004665314;
0.1, 0.1, -0.611359026;
0.1, 0.5, 0.094929006];
e1r = reshape(e1e2er(:,1), 3, []);
e2r = reshape(e1e2er(:,2), 3, []);
err = reshape(e1e2er(:,3), 3, []);
figure(1)
surf(e1r, e2r, err)
grid on
view(45, 25)
xlabel('e_1')
ylabel('e_2')
zlabel('err')
It works.
6 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!