Finding x value given y value
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!