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:
convert an m file to a simulink block

Subject: convert an m file to a simulink block

From: Reshma Valsan

Date: 19 Oct, 2010 04:24:04

Message: 1 of 2

i have got a m-file program which i want to convert to a simulink block.
is there any way?????

also while using the embedded fumction block in simulink a model error has occured..
the error is like this:

/**************
Error using ==> stateflow\private\slsf
Error using ==> stateflow\private\construct_error
Unable to create directory: C:\Program Files\MATLAB\R2006b\work\sfprj\build\RESH_TEST

Access is denied.
***************/

how can it be rectified???

Subject: convert an m file to a simulink block

From: Steven_Lord

Date: 19 Oct, 2010 13:19:27

Message: 2 of 2



"Reshma Valsan" <reshmachekkayil@yahoo.co.in> wrote in message
news:i9j6h3$j7u$1@fred.mathworks.com...
> i have got a m-file program which i want to convert to a simulink block.
> is there any way?????

To _convert_ your program to a block? Only the manual process, I'm afraid.

To _use_ your program _as_ a block? Look at the User-Defined Functions
blocks:

http://www.mathworks.com/help/toolbox/simulink/slref/f4-4889.html#f4-5797

> also while using the embedded fumction block in simulink a model error has
> occured..
> the error is like this:
>
> /**************
> Error using ==> stateflow\private\slsf
> Error using ==> stateflow\private\construct_error
> Unable to create directory: C:\Program
> Files\MATLAB\R2006b\work\sfprj\build\RESH_TEST
>
> Access is denied.
> ***************/
>
> how can it be rectified???

Well, it looks like Stateflow is attempting to create a directory in which
to build your model but you can't create a directory in the location in
which it's trying to do so (you don't have permissions, most likely.) CD to
a directory where you _do_ have permissions to create a directory and try it
again.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

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