Best way to specify parameters for a Simulink Embedded Matlab Fcn
1 次查看(过去 30 天)
显示 更早的评论
I have a fairly large Embedded matlab function that calls 20 other functions that are referenced below in the same Matlab Fcn block. Now, I have a large set of parameters that are used across these 20 functions. What is the best way to specify these variables? I tried supplying them as "Global variables" but then, MATLAB is throwing errors because global variables vary and the dimensions of the matrix based on them is of dimensions [:?x:?]. I tried supplying them as parameters, but then the sub-functions can't access them. I'm now running out of ideas... Please help.
Many thanks!
2 个评论
Kaustubha Govind
2013-6-26
Defining them as parameters seem like the right thing to do. Are you not passing the parameters into the sub-functions - they should become accessible that way.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Naming Conventions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!