3D plot for repetitive data

8 ビュー (過去 30 日間)
Isha Sharma
Isha Sharma 2018 年 4 月 13 日
コメント済み: Star Strider 2018 年 4 月 18 日
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];

採用された回答

Star Strider
Star Strider 2018 年 4 月 14 日
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 件のコメント
Isha Sharma
Isha Sharma 2018 年 4 月 18 日
Thanks! I will check this and edit accordingly. :)
Star Strider
Star Strider 2018 年 4 月 18 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by