File:Minimum fonction scilab.svg

Summary

Description
Français : Minimum de la fonction pseudo-convexe différentiable avec scilab.
English: Minimum of the différentiable pseudo-convex function avec scilab.
Date
Source Own work
Author Cdang

Scilab source

Category:Files by User:cdang
function [y] = fonction(x)
    y = x.*x + 5*sin(x);
endfunction

function [f, g, ind] = cout(x, ind)
    f = fonction(x);
    g = numderivative(fonction, x);
endfunction

n = 40;
x = linspace(-2*%pi, 2*%pi, n);
y = cout(x);

x0 = 0;

[fopt, xopt] = optim(cout, x0);

plot(x, y);
plot(xopt, fopt, "k+");
xtitle("$\text{Minimum de la fonction }y = x^2 + 5\sin x$");

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Minimum%20fonction%20scilab.svgCategory:Self-published work
Category:Scilab Category:Optimization
Category:CC-BY-SA-4.0 Category:Files by User:cdang Category:Images with Scilab code Category:Optimization Category:Scilab Category:Self-published work