フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How do I perform a mathematical operation on the data and the axis of a .*fig, such as re-scaling?

1 回表示 (過去 30 日間)
Erez
Erez 2016 年 3 月 13 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a figure with several functions plotted on it. I don't have the original data for all the function in arrays or matrices. I wish to perform some mathematical manipulations on the data and the axes, such as - x->x*x0, y->y/x0 (simple re-scaling), or other, more complicated ones such as x->x^2, y->y mod 2. This is more than just changing the labels on the axes. How do I do that? THX on advance!

回答 (1 件)

Ced
Ced 2016 年 3 月 13 日
For plotting, Matlab displays everything according to data points, i.e. it doesn't anything about the underlying function. It you want to change the underlying function, the only way I can think of (except changing the Ticks for simple scaling), is the following:
1. extract data
2. perform operation
3. update, e.g. either create a new plot, or update the existing data as
xdata = set(dataObjs, 'XData');
ydata = set(dataObjs, 'YData');
zdata = set(dataObjs, 'ZData');
Cheers
  1 件のコメント
Star Strider
Star Strider 2016 年 3 月 13 日
Note that getting the data from a .fig file is different between versions before R2014b, and R2014b and since.
See Walter’s Comment for details on the procedure required in R2014b and after.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by