Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Store a specific matrix value in a loop

조회 수: 1 (최근 30일)
Fabiano Da Mota
Fabiano Da Mota 2018년 11월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello All,
I am working a project where I am calculating the temperature distribution of a plate using an iteration method and a 50x50 matrix. I would like to store a specific node value after each iteration - please see below Tm(41,41), so I can plot it later. However, I am having trouble figuring out how I can do this.
Any advice would be greatly appreciated. Thanks in advance.
for n=1:Inter
Te=Tm;
t =t+dt;
for i=2:Nx-1
for j=2:Ny-1
Tm(j,i)= %..............................
end
end
Tm(41,41) % How to store these values? I would like to plot them later.
%
end
return

답변 (1개)

KSSV
KSSV 2018년 11월 22일
iwant=zeros(Inter,1);
for n=1:Inter
% your code
iwant()n=Tm(41,41);
end
  댓글 수: 1
Fabiano Da Mota
Fabiano Da Mota 2018년 11월 22일
Thank you. I will try this.

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by