필터 지우기
필터 지우기

how to save the all the iteration process data in workspace because in workspace it shows only the last data

조회 수: 4 (최근 30일)
  댓글 수: 2
Image Analyst
Image Analyst 2020년 5월 2일
How many columns are in element nodes? You need to know this.
It doesn't matter that cord1 and cord2 take on only the last value because they never change -- they don't depend on i whatsoever. Not sure what you're thinking here so we're not sure how to fix it.
By the way, don't use i (the imaginary variable) as a loop counter. Or j either. Use k instead.
DEWDROP
DEWDROP 2020년 5월 3일
There are two colums in element nodes,.Thank you very much for your reply

댓글을 달려면 로그인하십시오.

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 5월 3일
Change the for loop to something like this
indice1 = zeros(numberelements,2);
cord1 = zeros(numberelements,3);
cord2 = zeros(numberelements,3);
for k=1:numberelements
indice1(k,:) = elementnodes(k,:);
cord1(k,:) = nodescordinates(indice1(k,1),:);
cord2(k,:) = nodescordinates(indice1(k,2),:);
end
It will store value of each iteration as row of matrix indice1, cord1, cord2.

카테고리

Help CenterFile Exchange에서 Structured Data and XML Documents에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by