|
From: | John Placente |
Subject: | Re: Help Needed- Toeplitz |
Date: | Fri, 20 Nov 2009 09:22:25 +0800 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Dear Mr. Wolfgang, Thank you very much for your answer. It helped me a lot. I have another problem :( I have matrix A and I was successful in doing the toeplitz matrix. octave:10> A A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 octave:11> A1=toeplitz([A(1):A(20)]) A1 = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 13 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 11 12 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 11 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 10 12 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 13 12 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 6 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 3 4 5 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 3 4 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 3 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 2 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 HOWEVER, when i tried to do this on Matrix U1 which data are in decimal and matrix with dimension 50x1, it shows me the following errors. octave:14> W=toeplitz([U1(1):U1(50)]) error: invalid vector index = 1 error: evaluating binary operator `!=' near line 85, column 13 error: if: error evaluating conditional _expression_ error: evaluating if command near line 85, column 3 error: called from `toeplitz' in file `/usr/share/octave/site/m/octave-forge/FIXES/toeplitz.m' error: evaluating assignment _expression_ near line 14, column 2 This is the U1 Matrix data. U1 = 1.0229681 -1.0417115 -0.2172222 -0.0879658 -1.4350599 -1.0294053 0.3644003 -0.6838746 0.2047318 0.7655034 -0.3285525 0.7902697 0.5008379 -0.1097615 0.2704223 -1.0505377 -0.9998258 -0.3923205 -0.8440799 1.1867355 -2.5861352 1.4331135 -0.8686202 -0.4810349 -0.1128691 -0.2743879 -1.6506256 0.1561025 1.1341897 -0.9085022 -0.9582826 -1.2690583 0.0271779 -0.1003270 0.2646915 0.9343241 -0.2394759 0.6745559 1.1146986 0.7049394 1.1134460 -0.1280874 0.6551307 -0.3571107 0.5566171 -0.3898627 1.1107061 0.0068783 0.4948995 -0.2005472 Wolfgang Schechinger wrote: Dear John, a FOR loop should do the trick: something like this: count i from 5 to 10 count j form 5 dowto 1 -------- Original-Nachricht --------Datum: Fri, 20 Nov 2009 02:24:03 +0800 Von: John Placente <address@hidden> An: address@hidden Betreff: Help NeededSir, I am a graduate student from the Philippines and I would like to further know how to use the function TOEPLITZ in Octave. Basically I have a matrix A=[1;2;3;4;5;6;7;8;9;10] What I need to do (output) is: B=[5,4,3,2,1; 6,5,4,3,2; 7,6,5,4,3; 8,7,6,5,4; 9,8,7,6,5; 10,9,8,7,6] Can you help me please and writing the code? Thank you very much. Respectfully, John _______________________________________________ Help-octave mailing list address@hidden https://www-old.cae.wisc.edu/mailman/listinfo/help-octave |
[Prev in Thread] | Current Thread | [Next in Thread] |