plot parametric relationship between sigma max and tau max and highlighting the points which apply to the admissible values

2 ビュー (過去 30 日間)
figure
plot(tau_max,sigma_max)
hold on
plot(tau_adm,sigma_adm,'r*')
title('Parametric relationship between Sigma max (d) and Tau max (d)')
xlabel('Tau max (d)')
ylabel('Sigma max (d)')
  2 件のコメント
Zara
Zara 2023 年 4 月 7 日
Create a plot that highlights the points which are less than or equal to the admissible values for both sigma and tau

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

採用された回答

Bhanu Prakash
Bhanu Prakash 2023 年 4 月 10 日
Hi Zara,
As per my understanding, you want to create a plot that highlights the points which are less than or equal to the admissible values for both “sigma” and “tau”.
Consider the code below:
figure;
tau_max = randi([10 50],1,10);
sigma_max = randi([1 5],1,10);
tau_adm = 40;
sigma_adm = 4;
plot(tau_max,sigma_max);
for i=1:10
hold on
if(tau_max(i)<= tau_adm && sigma_max(i)<= sigma_adm)
plot(tau_max(i),sigma_max(i),"r*");
end
hold off
end
title('Parametric relationship between Sigma max (d) and Tau max (d)')
xlabel('Tau max (d)')
ylabel('Sigma max (d)')
The arrays "tau_max" and "sigma_max" are assigned with some random values, with the help of "randi" function. "tau_adm" & "sigma_adm" are assigned with the values 40 & 4 respectively.
To highlight the points which are less than or equal to the admissible values ("tau_adm" & "sigma_adm"), a combination of "for" loop and "if" statement is used.
You can refer to the documentation of "for" loop and "if" statement, for more info:
Hope this answer helps you.
Thanks,
Bhanu Prakash.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by