I have an Embedded MATLAB function in a Simulink model that consists of the following code:
function [a, secondOutput] = fcn(input) a.b = single(1); a.c = 1; secondOutput = 1;
I receive the following error when I run this model:
Class mismatch (single ~= double). The class to the left is the class of the left-hand side of the assignment. Function 'Embedded MATLAB Function' (#958.143.146), line 5, column 1:"a.b"
Best Answer