3D matrix from 2D matrix multiplied by 1D array
이전 댓글 표시
I have a 26 by 5 matrix and want to perform an operation via a 1D array of four entries as follows:
% constants
par_a = {0.043 0.0586 0.1344 0.2056};
par_b = {0.74 0.72 0.66 0.63};
divnum2 = 25;
X2=xo:((xf-xo)/divnum2):xf;
N3 = length(X2);
for i6 = 1:N3
x = X2(i6);
% radial coordinate
r = x*b;
% Rephi calculation at each interval
for i4 = 1:N2
Re_Phi {i6,i4} = (omega{i4}*(r^2))/nu;
end
end
Re_phi = cell2mat(Re_Phi);
for i6 = 1:N3
for i2 = 1:length(Ctflow)
Nu_r{i2} = par_a{i2} * (Re_phi.^par_b{i2});
end
end
However I am being met with this error:
Unable to perform assignment because brace indexing is not supported for variables of this type.
How can I go abot it and how can I then call a row or column of values from the resulting 3D matrix??
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!