fitting to multidimensional data

2 views (last 30 days)
sepideh
sepideh on 6 Apr 2013
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?

Answers (0)

Community Treasure Hunt

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

Start Hunting!