フィルターのクリア

How to seperate positve and negative x axis

2 ビュー (過去 30 日間)
Antonio Sarusic
Antonio Sarusic 2020 年 3 月 6 日
コメント済み: Star Strider 2020 年 3 月 6 日
Hello,
I have a function and I want to examine the curve of the function only for positive x values.
Does anyone have an ideo how i could do that?
I attached an image of how my function looks.

採用された回答

Star Strider
Star Strider 2020 年 3 月 6 日
Try this:
F = openfig('Bild_versch.fig');
Lines = findobj(F, 'Type','Line');
X = Lines.XData;
Y = Lines.YData;
LM = X > 0; % Logical Mask: Only Positive ‘X’ Values
figure
plot(X(LM), Y(LM))
grid
xlim([0 0.005]) % Optional
Note that since 0 has no sign, it is not considered to be either positive or negative. To include it, change the ‘LM’ assignment to:
LM = X >= 0; % Logical Mask: Only Non-Negative ‘X’ Values
  4 件のコメント
Antonio Sarusic
Antonio Sarusic 2020 年 3 月 6 日
Thank you very much
Star Strider
Star Strider 2020 年 3 月 6 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by