Use EmbeddedMatlab function without stateflow

I have developed an application on a computer that that has StateFlow, even though the application does not use stateflow.
When I try to run the application on another computer that does not have StateFlow installed, I get an error on my EmbeddedMATLAB Functions, saying that StateFlow is missing.
I have attempted to just remove the StateFlow path from my development computer. This makes it impossible to insert EmbeddedMATLAB blocks at all ('Bad Link').
Does anyone know how to get to the ordinary EmbeddedMATLAB block back?

6 Comments

What version of MATLAB are you using?
Are the Embedded MATLAB blocks coming from a library that also contains Stateflow charts?
Please consider reporting this to MathWorks Tech Support.
The embedded matlab block comes from the ordinary User-defined functions-"folder" in the simulink library, on a computer with stateflow installed.
To be clear, after you remove the Stateflow path from your development computer, can you go to simulink library->User-Defined Functions and drag/drop a usable "Embedded MATLAB Function" block?
No I can not.
If I run
rmpath('C:\Program Files (x86)\MATLAB\R2010a\toolbox\stateflow') and then open the simulink library, I get 'Bad link' if I drag-and-drop User-Defined Functions -> Embedded MATLAB Function into a model.
I made two screenshots from after I have removed the stateflow path. The first one is how it looks in the library (block still there) and the second one is how it looks if I drag-and-drop it in a model: http://imgur.com/a/PrrZH

Answers (1)

In R2011a, Embedded MATLAB functions have been renamed as MATLAB functions in Stateflow charts. I guess if you develop the model in old version but then move to a different computer with the new version of MATLAB, it's going to automatically convert the model and look for the Stateflow.

3 Comments

I am guessing that your answer is upgrade to R2011. Unfortunately this is not an option since we are using integration with dSpace functions that are not compatible with newer Matlab versions.
See update in the answer. What are the MATLAB versions in your two computer?
I am using the same version, R2010A, on both computers. If I "remove" StateFlow from my main computer by removing the path, I get the same error on that computer. It seems like StateFlow has completely replaced the Embedded Matlab block in the Simulink library since I get 'Bad Link' if I remove the Stateflow paths.

This question is closed.

Asked:

on 9 Sep 2011

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!