This is my script
syms x y z dS
z = sqrt(100 - x.^2 - y.^2)
zx = diff(z,x)
zy = diff(z,y)
dS=sqrt(1+zx.^2+zy.^2)
fun = @(x,y)(x+y+sqrt(100-x.^2-y.^2).*dS)
And this appear when i run it .....
>> Untitled3
z =
(- x^2 - y^2 + 100)^(1/2)
zx =
-x/(- x^2 - y^2 + 100)^(1/2)
zy =
-y/(- x^2 - y^2 + 100)^(1/2)
dS =
(1 - y^2/(x^2 + y^2 - 100) - x^2/(x^2 + y^2 - 100))^(1/2)
fun =
@(x,y)(x+y+sqrt(100-x.^2-y.^2).*dS)
So here's my problem , i have aldready set dS = sqrt(...) but Matlab doesn't replace dS in my fun function . How do I solve this ? Thank you

2 comentarios

KSSV
KSSV el 17 de Mayo de 2018
Please attach your code.....either copy paste or attach it as a file....image snippet doesn't help us to help you.
John Armitage
John Armitage el 17 de Mayo de 2018
okay , i edited it , thanks

Iniciar sesión para comentar.

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 17 de Mayo de 2018

0 votos

syms x y
z = sqrt(100 - x.^2 - y.^2);
zx = diff(z,x);
zy = diff(z,y);
dS=sqrt(1+zx.^2+zy.^2);
fun = subs(x+y+sqrt(100-x.^2-y.^2).*dS);
f = matlabFunction(fun);
M = integral2(f,0,10,0,@(x)sqrt(100-x.^2));

Más respuestas (0)

Categorías

Productos

Versión

R2016a

Etiquetas

Preguntada:

el 17 de Mayo de 2018

Comentada:

el 17 de Mayo de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by