フィルターのクリア

Interpolations and code to find difference between two lines

4 ビュー (過去 30 日間)
Eddy Ramirez
Eddy Ramirez 2020 年 10 月 18 日
コメント済み: Ameer Hamza 2020 年 10 月 18 日
How can I generate an interpolation using MatLab with the following numerers
M varies linearly from 1.5 to 1.4
C decreases from 2 to 0.5
Also, is there a way to generate a code on MatLab that will find the difference between two different lines?
For example, I have a straight line (linear) with the following points (-10,1) (10,1) and I have a nonlinear line on the x y plane and I need to find the difference between the linear and nonlinear curve
  1 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 10 月 18 日
You second question is unclear. Can you explain what do you mean by difference of two lines?

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

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 10 月 18 日
Fo your first question, see interp1(): max(): https://www.mathworks.com/help/matlab/ref/interp1.html
M = [1.5 1.4];
C = [2 0.5];
Mq = 1.45; % find value of C at this point
Cq = interp1(M, C, Mq);

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by