Have multiple function output in a single array
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!