Have multiple function output in a single array
Show older comments
Hello,
I have a function with 3 inputs and 1 output that I use within my code : "refpropm('h','T',T2+273.15,'Q',1,'R32')" T2 in one of the input parameters is a 1x45 double and what I want to get as the output is a single 1x45 double. I tried things like:
data = [ ] ; for T=T2 ; dat=refpropm('S','T',T+273.15,'Q',1,'R32')/1000 ; s2 = [data, dat] ; end
or
h2 = zeros(1,length(T2)) for i=1:length(T2) dat=refpropm('h','T',T2+273.15,'Q',1,'R32')/1000 h2(i)=dat end
But no good. Most of the time I end up with multiple 1x1's that overwrite the previous output finally keeping the last output. I'd really appreciate if someone could waste some of their time and help me out.
Respectfully, Hakan.
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!