Info

This question is closed. Reopen it to edit or answer.

How can I use matrix using MATLAB function ina simulink?

1 view (last 30 days)
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?

Answers (0)

Community Treasure Hunt

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

Start Hunting!