Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How to have several inputs for a single parameter for a function
1 回表示 (過去 30 日間)
古いコメントを表示
Hi
I've an issue regarding inputs. Fx. I've created a function which simulates fugacity of a mixture .
The function starts with something like:
function [ fiL,fiV,fL,fV ] = FUGACITY_INMIX_SRKVDW( Pc,Tc,omega,kappa,eta,P,T,x )
Problem is the mixture contains several components with different Pc. How do i put more than a single value for the input space of 'Pc'.
0 件のコメント
回答 (1 件)
Star Strider
2019 年 4 月 25 日
In your function, use ‘Pc’ as a vector. A vector of quantities can have as many as you want. Then, in your function, determine the number of elements in it, for example:
Pcn = numel(Pc);
and use that to determine loop index values or other information.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!