I have a question. The question is that is there a way to change a value which is defined inside a function file from a script file.
I have a function .m file called A, and this function file outputs a struct.
Inside this A.m file, I have defined a value x= 5 which is inside a struct along with other variables.
This function A.m file will then will called by a s-function to do some calculation. However, before being called by the s-function, I want to change the value x to another value from a script file B.m, so that the modified A.m function file can then be used in the s-function to obtain a different result.
Is there a way to do it?
I have tried loading all the variables (the struct) to the workspace and change the value of x, but this change only happened in the workspace but not in the function A .m file. Is there a way to make the change directly in the function file?
Thank you very much