如何提取曲线的纵坐标的值。

plot画出了直角坐标系中的一条曲线,根据横坐标用什么简单快捷的方法可以得到相应的纵坐标值。
画曲线的代码:
x=[0 20 25 35 40 50 65 70 80 100 125 140 150 175 180 200];
y=[3 3 1.5 1.5 5 5 0.5 0.5 2 4.5 4.5 4 4 1.5 1.5 0.5];
plot(x(1:end),z(1:end))
取值的横坐标为xx=1:200;

 採用された回答

dowehih
dowehih 2022 年 11 月 25 日

0 投票

那就是根据有限个点的坐标找到这些点周围其他点的坐标?内插就可以了,比如 interp1 函数,如果你相邻两点是用直线相连,内插用 linear 选项

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

タグ

質問済み:

2022 年 11 月 25 日

回答済み:

2022 年 11 月 25 日

Community Treasure Hunt

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

Start Hunting!