how to multiply a curve (in a plot) by -1, if you do not have the original data? (I only have the plotted data.)

5 ビュー (過去 30 日間)
Hey there!
I have a fig file, and I have multiple curves in it. I would like to obtain the exact curves, above the x-axis, in positive sense. I lost the original data, and I would like to multiply my data which are below the x-axis by "-1". If I had the original data, it would be quiet easy. However, its close to impossible for me to find out the orginal data. Any help would be more than appreciated. ((I only have the plotted data.))

回答 (2 件)

Bruno Luong
Bruno Luong 2022 年 4 月 25 日
Plot your figure, you can then retrieve the data with
x = get(findobj(gcf,'Type','line'), 'xdata')
y = get(findobj(gcf,'Type','line'), 'ydata')
  3 件のコメント
Bruno Luong
Bruno Luong 2022 年 4 月 25 日
"Would x and y look like matrix or vector?"
Why not try it and figure it yourself?
Zeynep Ertekin
Zeynep Ertekin 2022 年 4 月 25 日
can not acess matlab right now :( thanks for the answer!

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


KSSV
KSSV 2022 年 4 月 25 日

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by