Class in Matlab function block of simulink

1 view (last 30 days)
Hi, I am trying to define a class in matlab function block in simulink but it did not accept it. for example I write
F.max=4;
F.min=3;
it will accept the first definition but for the second it will return the class already defined cant be redifined or reused.
Please advise if I can define a class in this block.
Thank you,

Answers (1)

Walter Roberson
Walter Roberson on 17 Sep 2017
F = struct('max', 4, 'min', 3);

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!