Hi, I want to be able to add a field to an existing struct. Here is a simplified example:
function [Prm] = Testangles(input)Prm.NumAngles = input;Prm.Angles = linspace(0,360,Prm.NumAngles);
When I try to generate code, I get the error message: "??? This structure does not have a field 'Angles'; new fields cannot be added when structure has been read or used."
What would be the best way to deal with this problem?
Thanks! Sheida
Best Answer