How to draw exponential function in matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Does anyone know how to draw this function f(x)=sin(x). Exp(-lxl) in Matlab?Thanks.
0 comentarios
Respuestas (2)
Dave B
el 7 de Ag. de 2021
It seems like you listed a couple of functions, were you looking to plot them separately?
Can plot the functions using fplot
nexttile
fplot(@(x)sin(x))
nexttile
fplot(@(x)exp(-abs(x)))
Or plot values using plot
nexttile
x=linspace(-5,5,100);
plot(x,sin(x))
nexttile
plot(x,exp(-abs(x)))
8 comentarios
Walter Roberson
el 11 de Ag. de 2021
nexttile means to move to the next sub plot. It is a more modern way of using subplot() that has some advantages.
Chris Lin
el 7 de Ag. de 2021
5 comentarios
Walter Roberson
el 8 de Ag. de 2021
format long g
y = @(x,k) sin(x).*exp(-abs(x)).*exp(-i.*k.*x)
syms x k
area_sym = simplify(int(y(x,k), x, -10, 10))
area_k_sym = simplify(subs(area_sym,k,(1:8).'))
double(area_k_sym)
Ver también
Categorías
Más información sobre Axis Labels en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!