passing a cell array structure to matlab function
41 views (last 30 days)
I am using matlab function block in Simulink. I have to pass a structure as input to the function. I have changed the type to parameter in model explorer. While executing i received the error " Error using sf MATLAB class 'cell' found at 'ctx.S' is unsupported."
I tried converting the cell array to character array and then used the character array(instead of entire structure) as input to the function. In this case i got error " Error using sf Expression 's' for initial value of data 's' (#51) must evaluate to a numeric or logical"
ctx is the structure i am using.
i assigned the structure fields as s =ctx.S
ctx.S is a cell array of hexadecimal values stored as strings.
I want to have the data as hexadecimal inside the function.How do i pass the values in ctx.S to the matlab function used in Simulink?
Thanking you in advance.