[Scilab-users] spline and color plot on the chart
Federico Miyara
fmiyara at fceia.unr.edu.ar
Sat Apr 11 05:51:47 CEST 2020
Daniel:
I think you meant to include more than 1 point. You seem to have
confused the dimensions given by function size.
But anyway this doesn't seem to be what I suggested.
You should compute a spline for vt12 vs x (the right x, using b = c(2))
and another one for vv12. You don't need in this case to use lsq_splin,
but in case you want to use it, the third argument has usually less
points than the other two, for instance
[yvt, dvt] = lsq_splin (x, vt12, linspace(a, b, 8))
The output argumnts should be used in interp,as shown in the lsq_splin help.
Once you have a smoothed version of vt12_s vs x_s and of vv12_s vs x_s
you plot vv12_s vs vt12_s
Regards,
Federico Miyara
On 10/04/2020 21:05, Daniel Stringari wrote:
> c = size (vt12)
> a = 0
> b = c (1) // c (1) = 16
> n = c (1)
> x = linspace (a, b, n)
> [y, d] = lsq_splin (vt12, vv12, x ')
> plot (y, d, 'r')
> xlabel ('Speed (rpm)')
> ylabel ('Torque (Nm)')
> title ('Torque x speed values')
>
> //vt12 = 5350.3 5380.19 5410.08 5439.96 4149.5 4179.35 3756.57 3602.73
> 3568.12 3597.85 3681.91 3711.59 6143.24 6172.86 6202.49 6232.1
> //vv12 = 40.16 39.93 39.71 39.49 69.04 68.54 95.32 119.26
> 140.49 139.32 155.62 154.37 93.27 92.82 92.38 91.94
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200411/e3affb05/attachment.htm>
More information about the users
mailing list