Question: I need help to write a piece of code on MATLAB that displays my 3D vector color dependent on its magnitude. I can only seem

I need help to write a piece of code on MATLAB that displays my 3D vector color dependent on its magnitude. I can only seem to have one colour when using a quiver3 function. Ideally I would like to have about 5-10 colours on the same vector, with increasing brightness with magnitude ect......

THIS IS DONE ON ***MATLAB*** Here is my current code plot:

X=zeros(696,1); %1 to the values of inputs you have Y=zeros(696,1); Y=zeros(696,1); %1 to the values of inputs you have

U=sinM; %x components V=cosM; %y components

W=zeros(696,1); %1 to the values of inputs you have

figure quiver3(X,Y,ZMD3,U,V,W,'g', ... % change Z 'MaxHeadSize',0.01, ... 'LineWidth',6, ... 'MarkerEdgeColor','r', ... 'MarkerFaceColor','k', ... 'MarkerSize',20)

grid off

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!