help plot of function using handle
2 views (last 30 days)
Show older comments
Tlotlo Oepeng
on 5 May 2022
Commented: Star Strider
on 5 May 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 Comments
Accepted Answer
Star Strider
on 5 May 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 Comments
More Answers (1)
Benjamin Kraus
on 5 May 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 Comments
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!