Functions involving column vectors
Afficher commentaires plus anciens
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.
Réponses (1)
Andrei Bobrov
le 19 Déc 2016
One way:
[ii,jj,k] = ndgrid(A,B,C);
W = C.^2 * (1 + C) .* (1 + C.*A) .* (1 + C.*b) ./ (2 + C);
Catégories
En savoir plus sur Line Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!