How can I put my results in Matrix form?(Easy question.)

조회 수: 3 (최근 30일)
STamer
STamer 2013년 7월 19일
t x y
0 0 0
0.1 0.2994 0.8057
0.2 0.7725 1.4753
0.3 1.4192 2.0088
0.4 2.2 2.3795
0.5 2.9867 2.4999
0.6 3.7695 2.3634
0.7 4.5396 1.9774
0.8 5.1853 1.4398
0.9 5.6721 0.7807
1 6 0
For example t=0 then (P is function) P=0 0 , t=0.1 then P=0.2994 0.8057 , it goes on like that. But I don't want to input t each time manualy. I'm triying for loop but it didn't work.
I want to obtain matrix of P,
0 0
0.2994 0.8057
0.7725 1.4753
1.4192 2.0088
2.2 2.3795
2.9867 2.4999
3.7695 2.3634
4.5396 1.9774
5.1853 1.4398
5.6721 0.7807
6 0
my input will be t;
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Thanks and respect.

채택된 답변

STamer
STamer 2013년 7월 19일
Okay guys! I did it truly. Thanks in any case.
  댓글 수: 1
STamer
STamer 2013년 7월 19일
t2=[0 0.1 0.2 0.3 0.4 0.5 0.6 0.7];
for i=1:length(t2)
P{i}=curvefun( t2(i), B, X, k ) ;
end

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by