フィルターのクリア

Please Help.. How can I display a certain value in my plot?

10 ビュー (過去 30 日間)
hgrlk
hgrlk 2021 年 4 月 8 日
コメント済み: hgrlk 2021 年 4 月 13 日
Hello, I have a problem with my code.
My code gets some inputs then calculate the fuzzy membership function and gives the membership function graph. In the graph, I have a red cut-lined (--) plot which gives the calculated K parameter. But also I want to display the value of this in the graph. How can I do that with code?

採用された回答

DGM
DGM 2021 年 4 月 8 日
編集済み: DGM 2021 年 4 月 8 日
A simple way would be to use the legend itself, something like this:
x=linspace(0,2*pi,100);
y=sin(x);
xmark=pi/4;
clf
plot(x,y); hold on; grid on
h=plot([1 1]*xmark,[-1 1],'--k');
legend(h,sprintf('X = %f',xmark))

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by