Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How do I store a maximum value from a 3-d matrix to a 2-d matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a 3-d matrix z with variables x, y and s. I want to store the maximum value of z over s in a new matrix with variables x and y only. How should I do it?
if true
% code
end
x = 1:32;
y = 1:32;
s = 1:20;
[X,Y,S]= ndgrid(x,y,s);
z= X.^2 + Y.^2 -2.*X.*S +Y.*S;
%Now how do I store maximum of z in a new matrix called zmax(x,y)%
댓글 수: 0
답변 (1개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!