The input and output class is similar to the ones given below
%OUTPUT%
classdef OUTPUT_T
properties
output_1 = 0;
output_2 = 0;
end
end
%INPUT%
classdef INPUT_T
properties
input_1 = 10;
input_2 = 20;
input_3 = [];
end
end
classdef SUB_T < handle
properties
SUB_1 = 0;
SUB_2 = 0;
SUB_3 = 0;
end
end
the purpose of the mex function is to interface with an existing c/c++ function whose input is to be calculated via matlab and plot the result in matlab. So, my basic idea was that, within the mexfunction i update a local structure, after updating it from the workspace variable, and pass is to the c/c++ function. Similarly, the output workspace variable is updated from a structure returned/updated from the c/c++ function. Here the input_3 is assigned as an element of type of another class 'SUB_T'.