Functions involving column vectors
Ältere Kommentare anzeigen
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.
Antworten (1)
Andrei Bobrov
am 19 Dez. 2016
One way:
[ii,jj,k] = ndgrid(A,B,C);
W = C.^2 * (1 + C) .* (1 + C.*A) .* (1 + C.*b) ./ (2 + C);
Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!