So I created a table of x, y and z values and input them into fit using
f = fit([T.x, T.y],T.z,'cubicinterp')
they create the plot I would like but f is not a matrix for further processing.
Is there any way of getting z values for the fit object? I would like the output to be a 512x512 matrix
Sorry pretty new to matlab

답변 (1개)

Sanket Karnik
Sanket Karnik 2017년 5월 26일

0 개 추천

I understand that you want to fetch the z values from the fit object. Please refer to the following link which speaks about obtaining y values from the curve fitting tool: Get Y values from Curve Fitting Tool
You can use use the same method to obtain z values from fit object.

댓글 수: 1

Thanks Sanket I used the below code which seems to have worked too
[x2,y2] = meshgrid(1:512,1:512);
f2 = [f(x2,y2)];

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품

질문:

2017년 5월 24일

댓글:

2017년 5월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by