Need gradual data values.
显示 更早的评论
This is the data values I got for my equation. It is not smooth curve. If the data values are gradual, the curve is smooth. Generally, Where I rectify to get gradual values?

0.0320415867172945
0.184398415806668
0.0330722761271637
0.00593158809660344
0.00106384384348042
0.000190802817875919
3.42209202342026e-05
6.13760003501216e-06
1.10079255414445e-06
1.97429653341276e-07
3.54094582777690e-08
6.35076704185715e-09
1.13902454263924e-09
2.04286647610229e-10
3.66392758273023e-11
6.57133762217517e-12
1.17858437890949e-12
2.11381794403936e-13
3.79118065749105e-14
6.79956891191319e-15
1.21951818087333e-15
2.18723365076115e-16
3.92285340067338e-17
7.03572697769140e-18
1.26187366818545e-18
2.26319918255593e-19
4.05909931323577e-20
7.28008712697735e-21
1.30570021786759e-21
2.34180309823753e-22
4.20007722742912e-23
7.53293422903285e-24
1.35104892187110e-24
2.42313703238507e-25
4.34595149195947e-26
7.79456304700777e-27
1.39797264663868e-27
2.50729580216841e-28
4.49689216358189e-29
8.06527858156800e-30
1.44652609473487e-30
2.59437751788373e-31
4.65307520534857e-32
8.34539642645792e-33
1.49676586861698e-33
2.68448369732820e-34
4.81468269174236e-35
8.63524313641209e-36
1.54875053662087e-36
2.77771938414703e-37
4.98190302093494e-38
8.93515660784508e-39
1.60254070123860e-39
2.87419327029082e-40
5.15493113441686e-41
9.24548647276300e-42
1.65819906976727e-42
2.97401782272611e-43
5.33396874425575e-44
9.56659450635627e-45
1.71579052741179e-45
3.07730941454665e-46
5.51922456824746e-47
9.89885504874850e-48
1.77538221292648e-48
3.18418846063841e-49
5.71091457323429e-50
1.02426554413933e-50
1.83704359688380e-51
3.29477955805639e-52
5.90926222687402e-53
1.05983964786276e-53
1.90084656265939e-54
3.40921163115544e-55
6.11449875137923e-56
1.09664924972184e-56
1.96686338438106e-57
3.52750066766359e-58
6.32031682314549e-59
1.09823600535655e-59
Thanks for advance.
回答(1 个)
Actually, it IS quite a smooth curve. Almost perfectly smooth, in fact.
y = [0.0320415867172945
0.184398415806668
0.0330722761271637
0.00593158809660344
0.00106384384348042
0.000190802817875919
3.42209202342026e-05
6.13760003501216e-06
1.10079255414445e-06
1.97429653341276e-07
3.54094582777690e-08
6.35076704185715e-09
1.13902454263924e-09
2.04286647610229e-10
3.66392758273023e-11
6.57133762217517e-12
1.17858437890949e-12
2.11381794403936e-13
3.79118065749105e-14
6.79956891191319e-15
1.21951818087333e-15
2.18723365076115e-16
3.92285340067338e-17
7.03572697769140e-18
1.26187366818545e-18
2.26319918255593e-19
4.05909931323577e-20
7.28008712697735e-21
1.30570021786759e-21
2.34180309823753e-22
4.20007722742912e-23
7.53293422903285e-24
1.35104892187110e-24
2.42313703238507e-25
4.34595149195947e-26
7.79456304700777e-27
1.39797264663868e-27
2.50729580216841e-28
4.49689216358189e-29
8.06527858156800e-30
1.44652609473487e-30
2.59437751788373e-31
4.65307520534857e-32
8.34539642645792e-33
1.49676586861698e-33
2.68448369732820e-34
4.81468269174236e-35
8.63524313641209e-36
1.54875053662087e-36
2.77771938414703e-37
4.98190302093494e-38
8.93515660784508e-39
1.60254070123860e-39
2.87419327029082e-40
5.15493113441686e-41
9.24548647276300e-42
1.65819906976727e-42
2.97401782272611e-43
5.33396874425575e-44
9.56659450635627e-45
1.71579052741179e-45
3.07730941454665e-46
5.51922456824746e-47
9.89885504874850e-48
1.77538221292648e-48
3.18418846063841e-49
5.71091457323429e-50
1.02426554413933e-50
1.83704359688380e-51
3.29477955805639e-52
5.90926222687402e-53
1.05983964786276e-53
1.90084656265939e-54
3.40921163115544e-55
6.11449875137923e-56
1.09664924972184e-56
1.96686338438106e-57
3.52750066766359e-58
6.32031682314549e-59
1.09823600535655e-59];
x = 0:numel(y)-1;
semilogy(x,y,'o')
So only the very first point is at all in error. I would note that the first data point seems to be in error. But we can fix that. We can see the problem in another way from here:
diff(log(y))
And that plot suggests there is no need at all to smooth the curve. Ok, if you prefer, the first data point is just a bit off. We can use a simple straight line fit against log(y) to correct the first point.
P1 = polyfit(x(2:end),log(y(2:end)),1)
So the very first data point SHOULD have been approximately:
exp(P1(2))
semilogy(x,y,'bo',0,exp(P1(2)),'rs')
grid on
You should see that the red square now appears to be perfectly in line with the rest of the curve.
Again, all that was needed was to look at your curve in the correct way.
类别
在 帮助中心 和 File Exchange 中查找有关 Smoothing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

