Just a line Visual Basic to Matlab
显示 更早的评论
I am converting Visual Basic Code into Matlab; however, I am stuck at the line shown below;
USDStream.ComponentMolarFlow.SetValues Compositions, "kgmole/h"
Since there is a blank between SetValues and Compositions, I could not find how to change this part.
The other alternative will be;
Call f.Streams.Item('1').ComponentMolarFlow.SetValues(Components,'kgmole/h');
However, I do not know whether 'Call' is existing in Matlab.
I would appreciate if you can suggest a solution. Thanks.
回答(1 个)
Fangjun Jiang
2011-5-9
0 个投票
I don't think you need the "call" word here. You may need to add single quote if "Components" is the name of the property, such as:
f.Streams.Item('1').ComponentMolarFlow.SetValues('Components','kgmole/h');
The word "invoke" may be related. Check:
help invoke
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!