Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Make NaN value part of matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a 4d velocity matrix in a circular pipe: x,y,z,t
size are as follows:(number of grid points)
x=60,y=60,z=40,t=80
I want to use just 3 planes in x direction and make the remain as a NaN values.
How can I do that?(make just I want to keep 3 planes in x direction.one at the center of pipe,one on top of that and one bottom)
댓글 수: 0
답변 (1개)
Ameer Hamza
2020년 9월 24일
Do something like this
x_planes = [1 30 60]; % x-planes to keep
M = % 60x60x60x80 matrix
M_new = M*nan;
M_new(x_planes, :, :, :) = M(x_planes, :, :, :)
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!