Dear Scilab users,
We are pleased to announce the release of Scilab 2025.0.0 as a joint effort between Scilab contributors and the Numerical Computation team at Dassault Systèmes.
The main new features available to the users are:
Introduction of new language feature: lambda
Lambda functions are functions that can be declared and used at the same time:
t = 0:0.01:%pi;
y = ode(0, 0, t, #(t, y) -> (
y ^ 2 - y * sin(t) + cos(t)
));
plot(t, y);
For more information: lambda
Complex numbers syntax
To make them easier to write, complex numbers adopt a syntax closer to mathematics and science.
--> 1i - 1j
ans =
0. + 0.i
--> 3 + 2i
ans =
3. + 2.i
--> 5 + 0j
ans =
5. + 0.i
Graphic functions returns
Plotting functions return created graphic handles
h = xstring(0, 0, "Scilab");
h.font_foreground = color("red");
For more information: plot2d, plot3d, xstring and all others pages about plotting functions.
LaTeX in graphics text
Text in graphics can now mix math formulas and regular text by setting a new interpreter
property
h = xstring(0.5, 0.5, "$\frac{x}{y}$ is a fraction");
h.interpreter = "latex";
For more information: math_rendering_features_in_graphic.
Introduction of kmeans function
kmeans is an unsupervised learning method for clustering data points.
fig = scf();
fig.figure_name = "kmeans_demo";
fig.axes_size = [1021,460];
fig.color_map = [77, 175, 74
55,126,184
152,78,163
255,127,0] ./ 255
n = 200;
x1 = rand(n, 2, "normal") + 2 * ones(n, 2);
x2 = rand(n, 2, "normal") - 2 * ones(n, 2);
x3 = rand(n, 2, "normal") * 1.5 + ones(n, 2);
x4 = rand(n, 2, "normal") * -1.5 - ones(n, 2);
x = [x1; x2; x3; x4];
[index, c] = kmeans(x, 3);
subplot(121)
scatter(x(:,1), x(:,2), [], color(255,127,0), "fill")
title("Raw data")
subplot(122)
scatter(x(:,1), x(:,2), [], index, "fill")
scatter(c(:,1), c(:,2), 150, color(228, 26, 28), "fill") // centroid of each cluster
title("3 clusters and centroid")
For more information: kmeans
Add anti-aliasing on plots
Anti-aliasing is now fully functional and activated by default on plots (8x)
For more information: figure properties
For the complete list of changes and fixed bugs, please take a look at CHANGES.
Download this brand new version on Scilab website
Best regards,
Scilab Team