필터 지우기
필터 지우기

Need help in taking out values from a matrix

조회 수: 1 (최근 30일)
adi kul
adi kul 2016년 6월 10일
댓글: adi kul 2016년 6월 10일
Hello All, I am in a need of a guidance to taking out values from the matrix.
Here is my code:
for ii = 1:size(value,2)
% define f and minor radius for this iteration
f = value(ii);
[pres{ii},flag] = pressure(x,y,z{ii});
Now I want to plot a specific row out of the pressure. So my second for loop is:
for i=1:80
pank(i)=pres{ii(10,i)};
end
plot(x,pank)
As you can see I want to plot pres(10,i) of every length so I tried pres{ii(10,i)} which I not correct. I hope I am making some sense. I need help in plotting this for every value of ii.

채택된 답변

Walter Roberson
Walter Roberson 2016년 6월 10일
pank(i)=pres{ii}(10,i);
and removing the loop:
pank = pres{ii}(10, 1:80);
  댓글 수: 1
adi kul
adi kul 2016년 6월 10일
what a simple mistake I was doing! Thank for the help!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by