フィルターのクリア

How do I delete the weird flat line?

3 ビュー (過去 30 日間)
PromoCodeBSJ
PromoCodeBSJ 2018 年 10 月 2 日
コメント済み: Walter Roberson 2018 年 10 月 3 日
How do I delete the flat green line that appears? It seems to just pop in for no reason.
Current= xlsread(path,sheet,['B2:B' num2str(unique+1)]);
PeakPower= xlsread(path,sheet,['E2:E' num2str(unique+1)]);
Slope=PeakPower/Current;
figure(SlopevsA)
plot(Current,Slope)
hold on
That is my code

採用された回答

Adam Danz
Adam Danz 2018 年 10 月 2 日
If your variables Current and PeakPower are column vectors (which appears to be the case), when you divide them
Slope=PeakPower/Current;
the output, Slope is a matrix and at least one column of that matrix are zeros which produces the straight line at y=0.
  1 件のコメント
Walter Roberson
Walter Roberson 2018 年 10 月 3 日
Perhaps the instruction should be
Slope = PeakPower ./ Current;

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by