help plot of function using handle
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Tlotlo Oepeng
il 5 Mag 2022
Commentato: Star Strider
il 5 Mag 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 Commenti
Risposta accettata
Star Strider
il 5 Mag 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 Commenti
Più risposte (1)
Benjamin Kraus
il 5 Mag 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 Commenti
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!