Functions involving column vectors
Show older comments
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.
Answers (1)
Andrei Bobrov
on 19 Dec 2016
One way:
[ii,jj,k] = ndgrid(A,B,C);
W = C.^2 * (1 + C) .* (1 + C.*A) .* (1 + C.*b) ./ (2 + C);
Categories
Find more on Line Plots 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!