fitting to multidimensional data

2 次查看(过去 30 天)
sepideh
sepideh 2013-4-6
I am using fttype and fit functions to fit a costume function to my data. my independent variable has 3 dimension.
this is my code: ft = fittype( 'expo_space(x,a1,b1,c1,d1,e)' ); f = fit( [x(:,1),x(:,2),x(:,3)], output1, ft, 'StartPoint', [1, 1, 1, 1, 1] );
expo_space is my costume function.
I get this error :
Error using ==> fittype.fittype at 418 Expression expo_space(x,a1,b1,c1,d1,e) is not a valid MATLAB expression, has non-scalar coefficients, or cannot be evaluated: Error in fittype expression ==> expo_space(x,a1,b1,c1,d1,e) ??? Attempted to access x(:,2); index out of bounds because size(x)=[2,1].
Error in ==> para_space_expo at 160 ft = fittype( 'expo_space(x,a1,b1,c1,d1,e)' );
how can i use fittype to work with multi dimentsiona data?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by