Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fractional order trasfer function in matlab

Subject: Fractional order trasfer function in matlab

From: florin

Date: 12 May, 2009 16:56:01

Message: 1 of 9

Hello to all, I got a question of fractional order systems that need to be simulated in matlab( or find a rational aproximated transfer function) I have this code( not my own)
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

the syntax is : G=fotf(a,na,b,nb)
I'm getting this 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');
If someone can tell what is wrong will be a great help for me( sorry for bad english). Thanks

Subject: Fractional order trasfer function in matlab

From: Wayne King

Date: 12 May, 2009 17:15:05

Message: 2 of 9

Hi Florin, did you create the appropriate @ directly and a constuctor function? It doesn't look like it from the error.
wayne

"florin " <florin358@yahoo.com> wrote in message <guc9n1$q3c$1@fred.mathworks.com>...
> Hello to all, I got a question of fractional order systems that need to be simulated in matlab( or find a rational aproximated transfer function) I have this code( not my own)
> 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
>
> the syntax is : G=fotf(a,na,b,nb)
> I'm getting this 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');
> If someone can tell what is wrong will be a great help for me( sorry for bad english). Thanks

Subject: Fractional order trasfer function in matlab

From: Venu

Date: 17 Dec, 2009 06:39:03

Message: 3 of 9

The folder in which the file fotf is present must be named as @fotf

Subject: Fractional order trasfer function in matlab

From: Udomsak Boonprasert

Date: 13 Jan, 2013 23:12:08

Message: 4 of 9

Pls see my work from link below
https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxtY3Bmb3JlZXxneDoyNDM4ZWYwNmY5MjQ3N2Qw

"Wayne King" wrote in message <gucaqp$cci$1@fred.mathworks.com>...
> Hi Florin, did you create the appropriate @ directly and a constuctor function? It doesn't look like it from the error.
> wayne
>
> "florin " <florin358@yahoo.com> wrote in message <guc9n1$q3c$1@fred.mathworks.com>...
> > Hello to all, I got a question of fractional order systems that need to be simulated in matlab( or find a rational aproximated transfer function) I have this code( not my own)
> > 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
> >
> > the syntax is : G=fotf(a,na,b,nb)
> > I'm getting this 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');
> > If someone can tell what is wrong will be a great help for me( sorry for bad english). Thanks

Subject: Fractional order trasfer function in matlab

From: LUIS munoz

Date: 19 Jun, 2013 19:08:13

Message: 5 of 9

"Venu" wrote in message <hgcjm7$s02$1@fred.mathworks.com>...
> The folder in which the file fotf is present must be named as @fotf

I am now runnig this piece of matlab software:

kp=2.872185234368413;
ki=5.729820976261658;
niu=0.5784;

reg= fotf([1,0],[niu,0],[kp, kp*ki],[niu,0]);
H=fotf([1.7,1],[1,0],[1],[0]);
figure(1),bode(H*reg)

The error is:

??? Access to an object's fields is only permitted within its methods.

Error in ==> mtimes at 3
a=kron(G1.a,G2.a);

Could you please help me with this?. Thanks a lot. Luis

Subject: Fractional order trasfer function in matlab

From: Mervin Jey Fernanddo

Date: 13 Jul, 2013 06:24:07

Message: 6 of 9

"LUIS munoz" <lamunoz5@gmail.com> wrote in message <kpsvit$dne$1@newscl01ah.mathworks.com>...
> "Venu" wrote in message <hgcjm7$s02$1@fred.mathworks.com>...
> > The folder in which the file fotf is present must be named as @fotf
>
> I am now runnig this piece of matlab software:
>
> kp=2.872185234368413;
> ki=5.729820976261658;
> niu=0.5784;
>
> reg= fotf([1,0],[niu,0],[kp, kp*ki],[niu,0]);
> H=fotf([1.7,1],[1,0],[1],[0]);
> figure(1),bode(H*reg)
>
> The error is:
>
> ??? Access to an object's fields is only permitted within its methods.
>
> Error in ==> mtimes at 3
> a=kron(G1.a,G2.a);
>
> Could you please help me with this?. Thanks a lot. Luis

Hello ,
I am in need of a fully working code that could compute the "fractional order transfer function" in matlab on an urgent basis.So i read the above posts and had a work around in the given code.It is showing "undefined function or variable 'fotf' ".

So can you suggest me any other better alternative.

Subject: Fractional order trasfer function in matlab

From: Mervin Jey Fernanddo

Date: 13 Jul, 2013 06:25:07

Message: 7 of 9

"LUIS munoz" <lamunoz5@gmail.com> wrote in message <kpsvit$dne$1@newscl01ah.mathworks.com>...
> "Venu" wrote in message <hgcjm7$s02$1@fred.mathworks.com>...
> > The folder in which the file fotf is present must be named as @fotf
>
> I am now runnig this piece of matlab software:
>
> kp=2.872185234368413;
> ki=5.729820976261658;
> niu=0.5784;
>
> reg= fotf([1,0],[niu,0],[kp, kp*ki],[niu,0]);
> H=fotf([1.7,1],[1,0],[1],[0]);
> figure(1),bode(H*reg)
>
> The error is:
>
> ??? Access to an object's fields is only permitted within its methods.
>
> Error in ==> mtimes at 3
> a=kron(G1.a,G2.a);
>
> Could you please help me with this?. Thanks a lot. Luis

Subject: Fractional order trasfer function in matlab

From: Nasser M. Abbasi

Date: 13 Jul, 2013 06:56:58

Message: 8 of 9

On 7/13/2013 1:24 AM, Mervin Jey Fernanddo wrote:

> I am in need of a fully working code that could compute the "fractional order transfer function"
>in matlab on an urgent basis.So i read the above posts and had a work around in the given code.It
>is showing "undefined function or variable 'fotf' ".
>
> So can you suggest me any other better alternative.
>

http://www.mathworks.com/matlabcentral/fileexchange/1047-mimotool/content/jtools/fotf.m
  

Subject: Fractional order trasfer function in matlab

From: Nasser M. Abbasi

Date: 13 Jul, 2013 07:02:54

Message: 9 of 9

On 7/13/2013 1:56 AM, Nasser M. Abbasi wrote:
> On 7/13/2013 1:24 AM, Mervin Jey Fernanddo wrote:
>
>> I am in need of a fully working code that could compute the "fractional order transfer function"
>> in matlab on an urgent basis.So i read the above posts and had a work around in the given code.It
>> is showing "undefined function or variable 'fotf' ".
>>
>> So can you suggest me any other better alternative.
>>
>
> http://www.mathworks.com/matlabcentral/fileexchange/1047-mimotool/content/jtools/fotf.m
>
>

Ok, Try this instead:

http://fomcon.net/fomcon-toolbox/overview/

"The core of the toolbox is derived from an existing mini toolbox
FOTF (“Fractional-order Transfer Functions”), the source code for which
is provided in literature [1, 2, 3]. "

May be if you can follow these leads you'll find this toolbox

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us