Functions involving column vectors

I have 3 column vectors like this
A = [1 2 3 ... m]'
B = [1 2 3 ... n]'
C = [1 2 3 ... o]'
And I have another variable W related with A, B and C using the following function:
W = C^2 * (1 + C) * (1 + C*A) * (1 + C*B) / (2 + C)
I would like to find all values of W for all possible values of A, B and C. Also, how can I plot the result as a 3D figure with color intensity representing the value of W on it? I have tried several methods but none seems to work so far.

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 19 de Dic. de 2016
One way:
[ii,jj,k] = ndgrid(A,B,C);
W = C.^2 * (1 + C) .* (1 + C.*A) .* (1 + C.*b) ./ (2 + C);

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Dic. de 2016

Respondida:

el 19 de Dic. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by