How can I figure out the highest value in my diagram? And mark it?

1 回表示 (過去 30 日間)
Philipp Mueller
Philipp Mueller 2016 年 9 月 27 日
コメント済み: Philipp Mueller 2016 年 9 月 27 日
UPDATE My new Code! Input: "Input1.txt
Input_Matrix = textread('Rainflow_Input1.txt')
[zeilen,spalten]=size(Input_Matrix)
x = Input_Matrix(:,1)
y = Input_Matrix(:,2)
z = Input_Matrix(:,3)
colorbar('location','Manual', 'position', [0.93 0.1 0.02 0.81]);
az = 0;
el = 90;
view(az, el);
%scatter3(x,y,z,'filled')%Problem i dont know to make it filled
view(0,90)% view from above !!!http://de.mathworks.com/help/matlab/ref/view.html
a = 30;%markersize
scatter3(x, y, z, a, z, 'filled');
hold on
view(0, 90)
idx = find(max(z)) ;
hold on
plot3(x(idx),y(idx),z(idx),'*r')
colorbar
datacursormode on
How can I figure out the highest value in my diagram? I want to mark it in my diagram. So the x y and z value should be displayed from the highest value -> z!. Thank you for your help guys. I really appreciate it.
Input_Matrix = textread('Rainflow_Input1.txt')
[zeilen,spalten]=size(Input_Matrix)
x = Input_Matrix(:,1)
y = Input_Matrix(:,2)
z = Input_Matrix(:,3)
colorbar('location','Manual', 'position', [0.93 0.1 0.02 0.81]);
az = 0;
el = 90;
view(az, el);
%scatter3(x,y,z,'filled')%Problem i dont know to make it filled
view(0,90)% view from above !!!http://de.mathworks.com/help/matlab/ref/view.html
a = 30;%markersize
scatter3(x, y, z, a, z, 'filled');
view(0, 90)
colorbar;

採用された回答

KSSV
KSSV 2016 年 9 月 27 日
idx = find(max(z)) ; % gives the position of maximum z
hold on
plot(x(idx),y(idx),'*r) ; % plots the location
read about find..
  4 件のコメント
Philipp Mueller
Philipp Mueller 2016 年 9 月 27 日
yes but the wrong point is marked. See the colorbar another point with yellow/orange must be marked -> see my new code. sorry for making you troubles :/ i want to apologize
Philipp Mueller
Philipp Mueller 2016 年 9 月 27 日
i got it :D thanks anyway

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by