CFTool generated code not working

3 次查看(过去 30 天)
Hi, i inputed in cftool the followings vectors Phi (1x14) Alfa (1x14) ef (14x14) so to obtain an interpolant surface (biharmonic(v4)). After this i clicked on "Generate code" obtaining function [fitresult, gof] = createFit4(Phi, Alfa, ef)
%CREATEFIT4(PHI,ALFA,EF) % Create a fit. % % Data for 'untitled fit 1' fit: % X Input : Phi % Y Input : Alfa % Z Output: ef % Output: % fitresult : a fit object representing the fit. % gof : structure with goodness-of fit info. % % See also FIT, CFIT, SFIT.
% Auto-generated by MATLAB on 03-Dec-2014 17:58:10
%% Fit: 'untitled fit 1'. [xData, yData, zData] = prepareSurfaceData( Phi, Alfa, ef );
% Set up fittype and options. ft = fittype( 'biharmonicinterp' ); opts = fitoptions( ft );
% Fit model to data. [fitresult, gof] = fit( [xData, yData], zData, ft, opts );
% Plot fit with data. figure( 'Name', 'untitled fit 1' ); h = plot( fitresult, [xData, yData], zData ); legend( h, 'untitled fit 1', 'ef vs. Phi, Alfa', 'Location', 'NorthEast' ); % Label axes xlabel( 'Phi' ); ylabel( 'Alfa' ); zlabel( 'ef' ); grid on view( -62.5, 18 );
When i try to run this file i have this message:
Error using createFit (line 23) Not enough input arguments.
Can anyone help me to understand what i'm missing? Thanks

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fit Postprocessing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by