Custom MATLAB Functions in Simulink

preview_player
Показать описание
A custom MATLAB function script can be incorporated into a Simulink diagram with an "Interpretted MATLAB Function" block. This brief tutorial demonstrates a simple example with a couple inputs and outputs.
Рекомендации по теме
Комментарии
Автор

thank you very much, it helps me a lot

fsmid
Автор

Thanks for the video... Is it possible to use if statement in the matlab script? I have 3 outputs [S(1); S(2);S(3)] and 4 inputs;
The output is a calculated from the inputs {x(2); x(3) and x(4)}.
The if statement is performed on x(1).
Code responding error; output 'S' not assigned. Thanks again

mulashedavid
Автор

hi, i have made a electrical simulation in simscape and i need to obtain DWT of a certain phase current but it seems to me that there are some errors.do i need to do some conversion in the phase current?

lion_in_the_den
Автор

Great video! Perhaps you can help me. I am trying to create a custom block that will be able to compute z=e^(Ts) - where T is a sampling period and s is of the domain. Not sure how to create a block that will read this as a domain and not as a variable

Zaidious
Автор

Hey man, can you please tell me how can u differentiate between the multiple output you produced at the end of the video?

akshayshinde
Автор

Hi, I have written a matlab .m file which communicates with a touchscreen via an Arduino mega. The code returns a 2 x 1 matrix relating to an x and y coordinate. If I wanted to convert this m file to a Simulink block can I follow your approach as outlined in this video or is there a better way.

peterbennett
Автор

How is the simulink coder compatibility? can you make C out of it or does it require some more preparation?

kagain
Автор

Dear sir, This's nice video. I would like to know about transferring data from Simulink to M-file, and then send back signal from M-file to Simulink that is real-time, How to do this? I hope you will send the answer soon. Thanks a lot sir.

wijakpornsukvitoon
Автор

Dear APMonitor.com if i have to simulate a 3 scalar nonlinear differential equations . should i do it by calling the runge kutta from a matlab built in function in simulink or should i use an S function. what will be the advantages of the S function over the matlab built in function block?

FarooqKifayat
Автор

Hello! If you could help me it would be great!

(In simpowersystem) I'm trying to insert a resistor that accepts an input signal, but I can't. It seems that it's not compatible with the ones that are already in Matlab

I need that this resistor varies in function of the input signal, because it will be connected to the outputs of a solar panel (simulated) and this resistor receives the current signal from the inverter

so... jajaja thanks again!!

fridahermosisima
Автор

Hey
Could you help me identify how to access and edit codes of functional blocks already present? ( I mean ones that are coded by Matlab and not custom coded)
Say like counter functional block present in Switches and Counters, Simulink (dspswit3).

sandhyaramasubramanian
Автор

hey there.. i wanna make a function whch takes multiple input variables and gives multiple outputs..how can i do it?

naadhami
Автор

hi! great video tutorial !
I have some trouble with an aplication, enunciated bellow :

build a model that simulates a first order system of Error ! Referral source not found.
in response to an input u = sin(t) using MATLAB Fcn block of User's defined Functions category.

excuse my english :p
thnx in advance

masnsenyuva
Автор

Hey really nice video :)

I hope you can help me:
I want to know the solution for x1 of the following function (i know u1, u2, u3):



What i have to write ?

rid
Автор

can you help me how to write sin(wt+120) in matlab simulink

ayyappakurapati
welcome to shbcf.ru