|
楼主 |
发表于 2009-11-18 22:50
|
显示全部楼层
if i do it like this:
t=-N+1:N;
A=1.0;f=17.2;phi=40;
y=A*cos(2*pi*t*f/N+phi*pi/180);
everythings goes right.
but if i just want to use phase1,error jumps out:
??? Error using ==> times
Matrix dimensions must agree.
phase1 is <128*1 double>,shows here:
0
3,93396163586619
8,83046453180072
11,6311186638529
11,2852032132275
8,16429115438237
3,42142700284035
-2,00785915626561
-7,27003758417477
-10,9814095127588
-11,7693210235971
-9,50125290401178
-5,19827852519589
0,0755540599887536
5,52110483988927
9,96033284685893
11,8671678631308
10,5897860671053
6,85986574516244
1,83106201768410
-3,65438621341892
-8,62018703590539
-11,5601862248507
-11,3745054979715
-8,36678942985316
-3,68031853969484
1,73128196808665
7,02865158843185
10,8551703544759
11,8053382813413
9,67138766757273
5,44247874386262
0,199150317798624
-5,25906344418210
-9,78506215112777
-11,8459275005807
-10,7196707217138
-7,08425677046303
-2,09903232786475
3,38117109361063
8,40488708594418
11,4811148238893
11,4565288437530
8,56509172811930
3,93733854866132
-1,45468198789504
-6,78373271813096
-10,7214927023010
-11,8333425140581
-9,83622848517273
-5,68414033754368
-0,473112878088091
4,99493146583130
9,60350867104510
11,8163791138212
10,8431395116249
7,30529084768279
2,36564033520522
-3,10709203536907
-8,18474661381370
-11,3939737550963
-11,5311484142206
-8,75904829498166
-4,19239895590748
1,17818129656841
6,53549662248908
10,5805184253717
11,8532632418226
9,99561433953389
5,92315733116069
0,746239014363543
-4,72889980941472
-9,41586673610081
-11,7785245895997
-10,9600403119510
-7,52283744904273
-2,63080243663561
2,83230289230774
7,95998397314823
11,2988435253994
11,5982457374237
8,94850686170142
4,44540986626462
-0,901897207769072
-6,28415660713507
-10,4323983310435
-11,8650394268420
-10,1493841184832
-6,15942046354795
-1,01843680070663
4,46115450507246
9,22233591019281
11,7323769588005
11,0702242695693
7,73676255080719
2,89443515304596
-2,55695194856533
-7,73081845715696
-11,1958155393794
-11,6577092368834
-9,13331291839477
-4,69627928205803
0,625942508097649
6,02992315176618
10,2772917515210
11,8686198504245
10,2973770472697
6,39281707734105
1,28961663446127
-4,19187648975836
-9,02312039187059
-11,6779605360029
-11,1735463316539
-7,94692872442234
-3,15645477707631
2,28118197793132
7,49746969034869
11,0849918617198
11,7094346686512
9,31330999123343
4,94491285854079
-0,350425718110841
-5,77300349552364
-10,1153660200609
-11,8639634366244
-10,4394331578059
-6,62323103689094
-1,55969087316637
what's wrong:@Q |
|