Finding x value given y value

1 回表示 (過去 30 日間)
David
David 2011 年 3 月 31 日
Hi all. I am using the following code to print a plot. How do i then fin a corresponding x value given y (m) = 80?
function qn1 A = 0.4; P = 101.3*10^3; T = 288.2; D = 1.225; Y = 1.4; R = 287.05; m=size(10);
%Start part a code Mi = 0:0.1:1; m = A.*Mi.*P.*((1+(0.4/2).*(Mi.^2)).^(2.4./-0.8)).*sqrt(1.4./(R.*T)); h=plot(Mi,m);
Cheers.

回答 (1 件)

Josh
Josh 2011 年 3 月 31 日
You must be doing some kind of low-speed aerodynamics... those numbers remind me of my undergrad years.
I believe you should look into polyfit and polyval. Polyfit will give you coefficients of a polynomial best-fit for a set of data points, then polyval will interpolate the data between the data points using those coefficients.

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by