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 CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by