converting M-file into a block function in simulink

hello can you show me how to move "file.m" into a function block in simulink thank you!

2 commentaires

what do you mean?
I want to know all the "file.m" transformed into a block in "simulink"?

Connectez-vous pour commenter.

 Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 15 Août 2012
Modifié(e) : John Kelly le 26 Fév 2015

0 votes

You can call the function from any of three MATLAB Function blocks.

10 commentaires

thank you, I want to know all the "file.m" transformed into a block in "simulink"?
You cannot "transform" it into a block exactly, but calling it from one of the aforementioned blocks will essentially do that.
Thank you, I'll ask you later. Can you give me email?
Sorry, we do not encourage sending personal messages. Please feel free to post any questions you run into on this forum though.
thank you, I see
I have a example "http://www.mathworks.com/matlabcentral/fileexchange/20431-dial", can you help me converter into a block in silulink
Sorry, perhaps you could try following my advice and post back if you run into specific issues.
I use a block "Level-2 M-file S-Function", M-file name = duong_truyen, I get a error: "Eroor due to multiple causes --> Too many input arguments.-->Error evaluating the initialization for M-S-Function 'duong_truyen'.Too many input arguments.The following is the MATLAB call stack (file names and line numbers) that produced this error:"
Please start a new question and paste your code and the error message with the stack as well.
dong van duc
dong van duc le 23 Août 2012
Modifié(e) : dong van duc le 23 Août 2012
yes, I created a new question.

Connectez-vous pour commenter.

Plus de réponses (2)

Youssef Haical
Youssef Haical le 5 Sep 2014
Modifié(e) : Youssef Haical le 5 Sep 2014

0 votes

i made it but this answer is not clear ,,,, please try to show us just how we can add the initial values to run the simulink model without opening the command window and writing the values and then we run the simulink model
for example : i have this initial parameters : Pm=100e3; Flux=200; Ts=2e-5; p=2 ; N=2; f=50;
i need to make them inside of my simulink model without writing them in m-file or in command window
please help me
karishma kousar
karishma kousar le 1 Avr 2016

0 votes

hello sir i have a matlab code for face detection but i dont know how to do the simulink blocks,please any one can help me in this designing a simulink model for my matlab code

Catégories

En savoir plus sur Modeling dans Centre d'aide et File Exchange

Produits

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by