Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How can I use matrix using MATLAB function ina simulink?

1 visualizzazione (ultimi 30 giorni)
sewook
sewook il 9 Lug 2014
Chiuso: MATLAB Answer Bot il 20 Ago 2021
In my simulink file, there is MATLAB fucntion.
First line of MATLAB function is below:
function Temp =fcn(a,b,c,...,T0)
Temp and T0 is matrix.
Temp(x,y) = f1(a,b,c) and T0(x,y) is a feedback of Temp.
A method that set x,y, and caculate T(x,y) is decribed in fucntion body.
If I execute this file, there is an error msg because of variable T.
Data 'T' is inferred as a variable size matrix, while its specified type is something else
But if I change T --> T(x,y) a syntax error occurs.
function Temp(x,y) =fcn(a,b,c,...,T0(x,y))
I already refer varargin and varargout, but error occurs.(varagin cannot be use first line.)
How can I do?

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by