florin358 Posted May 12, 2009 Posted May 12, 2009 Hello all, I need an advice with this code: function G=fotf(a,na,b,nb) if nargin==0, G.a=[]; G.na=[]; G.b=[]; G.nb=[]; G=class(G,'fotf'); elseif isa(a,'fotf'), G=a; elseif nargin==1 & isa(a,'double'), G=fotf(1,0,a,0); else, ii=find(abs(a)<eps); a(ii)=[]; na(ii)=[]; ii=find(abs(b)<eps); b(ii)=[]; nb(ii)=[]; G.a=a; G.na=na; G.b=b; G.nb=nb; G=class(G,'fotf'); end Syntax is : G=fotf(a,na,b,nb) its not my own this give an error : ??? Error using ==> class The CLASS function must be called from a class constructor. Error in ==> fotf at 9 G.a=a; G.na=na; G.b=b; G.nb=nb; G=class(G,'fotf'); Anyone know what is wrong will be a great help, thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now