Mismatch between 'formula' and graphed 'surface'
Show older comments
Hi guys,
I have a feeling that my code isn't generating the surface I want. I basically have this test function:
x = [0:50];
y = [0:50];
ModY = @(x,y) [20*(y<20) + 80*(y>80) + y*((y>=20)&(y<=80))];
Test1 = @(x,y) ((1300./ModY(x,y)-3.34)-(1.3./((1.3./(x))-((3.44)./998))));
[X1,Y1] = meshgrid(x,y);
Z1 = Test1(X1,Y1);
s1 = surf(X1,Y1,Z1,'LineStyle','none');
But when I test the function as follows:
Test1(40,20)
ans =
16.9144
I'm not convinced that it's a match. I feel like something is happening in my condensed code. Please help! Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Whos 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!
%20-%202015%2005%2003.png)