help plot of function using handle
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tlotlo Oepeng
el 5 de Mayo de 2022
Comentada: Star Strider
el 5 de Mayo de 2022
b1 =1
b2 =2
b3 =3
%--------Function:
G =@(k) -2*k.^2 + b1 + sqrt( (-4*k.^4 - b2*k.^2 + sqrt((-4*k.^4 - b3*k.^2).^2 + b4^2 ))/2)
%-------Grid:
k = [-2:0.01:2]
% y = bsxfun(f,x,p)
% %-------Plot
%
% figure
plot(k,G)
help code wont run
0 comentarios
Respuesta aceptada
Star Strider
el 5 de Mayo de 2022
Call ‘G’ with its argument —
b1 =1
b2 =2
b3 =3
b4 = 4 % Replace Missing Value
%--------Function:
G =@(k) -2*k.^2 + b1 + sqrt( (-4*k.^4 - b2*k.^2 + sqrt((-4*k.^4 - b3*k.^2).^2 + b4^2 ))/2)
%-------Grid:
k = [-2:0.01:2]
% y = bsxfun(f,x,p)
% %-------Plot
%
% figure
plot(k,G(k))
.
2 comentarios
Más respuestas (1)
Benjamin Kraus
el 5 de Mayo de 2022
b1 = 1;
b2 = 2;
b3 = 3;
b4 = 4;
G =@(k) -2*k.^2 + b1 + sqrt( (-4*k.^4 - b2*k.^2 + sqrt((-4*k.^4 - b3*k.^2).^2 + b4^2 ))/2);
fplot(G)
xlim([-2 2])
0 comentarios
Ver también
Categorías
Más información sobre Line Plots 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!