필터 지우기
필터 지우기

get x values for given y from fit

조회 수: 2 (최근 30일)
Jelle van Zuijlen
Jelle van Zuijlen 2015년 2월 16일
편집: Star Strider 2015년 2월 16일
I have data points x and y. I fit a 3rd order polynomial through these points. Now i want to find the x- values from the polynomial for
y = 0.00:0.05:14.00
This is the code for the fit:
x = [5965 7867 9459 11763 13881 14794 16000 16619 20000];
y = [3.7 6.34 7.04 7.89 8.61 8.91 9.25 9.42 10.19];
[p,~,mu] = polyfit(x,y,3);
y2 = polyval(p,x,[],mu);
plot(x,y,'o')
hold on
plot(x,y2)
hold off
please tell how to get a matrix with all the x-values for the given y-values. I'm new to matlab and clueless

답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by