From: Pekir on
Hi All:

I created a power transformer using a finite element program comsol.
I extracted the M file from that program and i want to convert that M file
to a simulink model to do a transient study. How do I go about that?

Best Regards,
PJ
From: us on
"Pekir " <peejaydubz(a)aol.com> wrote in message <i250fh$n3e$1(a)fred.mathworks.com>...
> Hi All:
>
> I created a power transformer using a finite element program comsol.
> I extracted the M file from that program and i want to convert that M file
> to a simulink model to do a transient study. How do I go about that?
>
> Best Regards,
> PJ

a hint:
- look at SL's S-function capability...

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/sfg/f7-60056.html

us
From: neil on
"us " <us(a)neurol.unizh.ch> wrote in message <i250v2$o5i$1(a)fred.mathworks.com>...
> "Pekir " <peejaydubz(a)aol.com> wrote in message <i250fh$n3e$1(a)fred.mathworks.com>...
> > Hi All:
> >
> > I created a power transformer using a finite element program comsol.
> > I extracted the M file from that program and i want to convert that M file
> > to a simulink model to do a transient study. How do I go about that?
> >
> > Best Regards,
> > PJ
>
> a hint:
> - look at SL's S-function capability...
>
> http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/sfg/f7-60056.html
>
> us

Well since you have M code you could probably use an embedded MATLAB block.
You will have to tweak your code as it only allows a subset of M commands and does not allow for dynamic array growth.