001122 发表于 2009-2-8 20:36

请帮助一下编程错误

data = csvread('1.dat')
t=data(:,1);
d=data(:,2);
plot(t,d);
结果是:
>>
data =
         0
         0
    0.0250
-46.2342
    0.0500
-35.5118
    0.0750
-27.7719
    0.1000
-26.6477
    0.1250
-32.3564
    0.1500
-34.4636
    0.1750
-40.8952
    0.2000
-51.4507
    0.2250
-57.7235
    0.2500
-65.5880
    0.2750
-75.0643
    0.3000
-81.3193
    0.3250
-89.2063
    0.3500
-98.4311
    0.3750
-104.0960
    0.4000
-110.3050
    0.4250
-118.5670
    0.4500
-126.4190
    0.4750
-134.6810
    0.5000
-143.8600
    0.5250
-153.3940
    0.5500
-163.4350
    0.5750
-174.4880
    0.6000
-183.7340
    0.6250
-193.2710
    0.6500
-201.9790
    0.6750
-203.8460
    0.7000
-204.7210
    0.7250
-205.2810
    0.7500
-201.8620
    0.7750
-196.0210
    0.8000
-190.0230
    0.8250
-177.2190
    0.8500
-168.1890
    0.8750
-162.1740
    0.9000
-151.3200
    0.9250
-143.1810
    0.9500
-134.8440
    0.9750
-125.8620
    1.0000
-117.0000
    1.0250
-105.2780
    1.0500
-96.1344
    1.0750
-87.3101
    1.1000
-78.9415
    1.1250
-72.7751
    1.1500
-64.9308
    1.1750
-57.4864
    1.2000
-52.4706
    1.2250
-45.7773
    1.2500
??? Index exceeds matrix dimensions.
Error in ==> E:\ftt.m
On line 3==> d=data(:,2);

cowry 发表于 2009-2-9 09:05

把数据的格式变一下

bhalkar 发表于 2009-2-9 11:29

Hello 001122,

I am posted graph and program toady link

http://www.simol.cn/thread-13580-1-1.html

Thanks brothers

001122 发表于 2009-2-9 13:24

大哥:应经好了,但还有一些问题,请您协助解决:
1、为什么仿出来的谐波波形和ansoft软件仿出来的谐波波形差的比较远;
2、我想要以图形和数据形式表示其谐波情况,就像ansoft软件的一样,这样才能对比;
还望多多指点,谢谢!!

bhalkar 发表于 2009-2-9 15:06

Hello 001122,

With some modified program.
I am posted graph
http://www.simol.cn/thread-13580-1-1.html

What value of Total Harmoinc Distoration THD using maxwell v12?

Thanks brothers
页: [1]
查看完整版本: 请帮助一下编程错误