Do you mean that you want to create a Simulink.Parameter object that has the same name as that of the input argument in its caller workspace? In other words, if I invoked your function using CheckA2L(someObj) from the base workspace, you need an object called "someObj" created? If yes, you can use the inputname function as follows: function CheckA2L(Signal)
A = ehooks_get_msmtvariable_properties(Signal);
if isempty(A) && strcmp(const_value(1),'K')
Signal = Simulink.Parameter;
Signal.Value = 1;
Signal.StorageClass = 'ImportedExtern';
eval([inputname(1) '=Signal;']);
save('MissingCals',inputname(1),'-append')
end
Best Answer