I am using constant block which have value equal to 'abc' and one more block having value equal to 4.I dont want to change the constant block name when the value present is numeric.
2 次查看(过去 30 天)
显示 更早的评论
I am using constant block which have value equal to 'abc' and one more block having value equal to 4.I dont want to change the constant block name when the value present is numeric.
0 个评论
回答(1 个)
Sebastian Castro
2015-10-23
Assuming you just want to know if there's a variable or a hard-coded numerical value in your blocks. If so, I would look into the isvarname function to implement your logic:
>> isvarname('4')
ans = 0
>> isvarname('abc')
ans = 1
- Sebastian
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!