Fill in values in function

5 views (last 30 days)
Annelotte
Annelotte on 27 Jan 2023
Edited: Matt J on 27 Jan 2023
I have the function Z = (1.5-X+X.*Y).^2 +(2.25-X+X.*(Y.^2)).^2+(2.625-X+X.*(Y).^3).^2.
How can I calculate Z(0,0) in my code?

Accepted Answer

Matt J
Matt J on 27 Jan 2023
Z = @(X,Y) (1.5-X+X.*Y).^2 +(2.25-X+X.*(Y.^2)).^2+(2.625-X+X.*(Y).^3).^2;
Z(0,0)
ans = 14.2031
  2 Comments
Matt J
Matt J on 27 Jan 2023
Edited: Matt J on 27 Jan 2023
Z is now a function.
surf(X,Y,Z(X,Y),'EdgeColor','none','LineStyle','none','FaceLighting','phong');

Sign in to comment.

More Answers (0)

Categories

Find more on Resizing and Reshaping Matrices in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!