How i can plot the below sigmoid function?

22 visualizaciones (últimos 30 días)
Ezzin Hamdi
Ezzin Hamdi el 5 de Mzo. de 2021
Comentada: Ezzin Hamdi el 5 de Mzo. de 2021
p=2;%Gradient coefficent
z=[0:0.1:1/2]*1e-3;
G=1-1/2*(((h/2)-z)/(h/2)).^p; Sigmoid fuction
z1=[-1/2:0.1:0]*1e-3;
G1=1/2*(((h/2)+z)/(h/2)).^p; Sigmoid function
How i can plot the sigmoid function in the all thickness [-1/2:1/2] ?
p=2;%Gradient coefficent
z=[0:0.1:1/2]*1e-3;
G=1-1/2*(((h/2)-z)/(h/2)).^p; Sigmoid fuction
z1=[-1/2:0.1:0]*1e-3;
G1=1/2*(((h/2)+z)/(h/2)).^p; Sigmoid function
Hi,
I am trying to plot the below sigmoid function versus all thickness.
Any help on how to do that?
Thanks.

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 5 de Mzo. de 2021
It is all about specific parameter values ​​how we know this, because we cannot be from the same subjective field.
  • Define the typical values parameter.
  • Expression or equation must be correct.
Here I have shown how you can obtain such a plot, but note that, to get exactly the same plot, the parameter values ​​and expressions must be the same according to the literature.
p=1:10; %P data is OK
h=4;
z=-0.2:0.01:0.2;
for i=1:length(p)
G=1-1/2*(((h/2)-z)/(h/2)).^p(i);
plot(z./h,G);
hold on
grid on;
end
Please do modify accordingly, more note on x data, which is z/h
  1 comentario
Ezzin Hamdi
Ezzin Hamdi el 5 de Mzo. de 2021
Thanks for your reply.
I can do this expression easily, i work with Matlab for years.
But the expression of G is different in [-1/2:0] interval, G=1/2*(((h/2)+z)/(h/2)).^p(i);
i would like to plot the two different functions in same graph.
%sigmoid distributions,
clear ,
close all
h=1e-3;
p=2;
z=[0:0.1:1/2]*1e-3;
G=1-1/2*(((h/2)-z)/(h/2)).^p;
z1=[-1/2:0.1:0]*1e-3;
G1=1/2*(((h/2)+z)/(h/2)).^p;

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics en Help Center y File Exchange.

Productos


Versión

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by