Borrar filtros
Borrar filtros

I am trying to get a numerical gradient with three variables, but I keep getting Error using gradient (line 49) Too many output arguments.

1 visualización (últimos 30 días)
I am trying to get a numerical gradient with three variables, but I keep getting Error using gradient (line 49) Too many output arguments. This is what I have:
clc, clear x = -3:0.2:3; y = x'; z = x'; f = cos(x.*y.*z.^2); % I even put in a visual surf(x,y,f) xlabel('x') ylabel('y') zlabel('z') % End of code for a visual [fx,fy,fz] = gradient(f,0.2); x0 = pi; y0 = 1/4; z0 = -1; t = (x == x0) & (y == y0) & (z == z0); indt = find(t); f_grad = [fx(indt) fy(indt) fz(indt)]
Any and all help is appreciated. Thank you!

Respuestas (1)

Sangeetha Jayaprakash
Sangeetha Jayaprakash el 4 de Abr. de 2017

Categorías

Más información sobre Weather and Atmospheric Science en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by