Make scalar data into a vector
4 ビュー (過去 30 日間)
%Use inverse matrix to form system curve equation
A1=[n totalX1 totalB;totalX1 totalB totalC;totalB totalC totalD];
fprintf(fid,'\n\nFor Single Pump\n');
fprintf(fid,'The Operating point is at Q=%.3fm3/s\n\n',x(i));
RQ=0.7; %Requested flow rate
the above is my coding. What I would like to ask for help is: how can I make the 'x' values (scalar) when 'if a(i)==b(i) into a vector? there were multiple output for x values but i want to compile them into a vector.
Hope can help.
回答 (1 件)
KSSV 2022 年 1 月 26 日
a(i)==b(i) gives a logical output i.e. either 0 or 1. If a and b are vectors a == b, gives a logical vector as output having 1 and satisfied location and 0 at condition not satisfied. To check you can use