How to plot a 3D function?

I'm trying solve this problem for the last one year but unable to do so. Please if anyone can help me.
I roughly code a program but don't know how can I plot it.
N0=100;
r_med=[0.445 0.889 1.445 2];
sigma_g=7;
N_ang=91;
theta=[10 20 45 60 90]/180*pi;
t = [0:180]/180*pi;
phi =0:(pi/360):(pi/2);
Num_r = 50e3;
r = linspace(1,50,Num_r)./2;
col=['k' 'b' 'r' 'g' 'm'];
I0=1;Q0=1;U0=0;V0=0;
for i=1:length(theta)
hold on
for j=1:length(r_med)
[P11(j,:),P12(j,:),P33(j,:),P34(j,:),Qsca_c(j,:),~,~] = ZK_W_Cloud_PhaseFunc(N0,r_med(j),sigma_g,N_ang);
[~,indx] = find(theta(i)==t);
F(j,:)=(P11(j,indx).*I0+((P12(j,indx).*Q0.*cos(theta(i)))+(P12(j,indx).*U0.*sin(theta(i)))));
end
end

3 comentarios

Walter Roberson
Walter Roberson el 31 de Dic. de 2021
never compare floating point numbers for equality unless they are derived from the same array. No promises that any theta entry will equal t.
John D'Errico
John D'Errico el 31 de Dic. de 2021
Your formula lacks any use of the parameter V0. So where is V0 employed?
Wiqas Ahmad
Wiqas Ahmad el 1 de En. de 2022
These four parameters are constant. For the time being you just ignore it. The plot has nothing to do with the V0.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 31 de Dic. de 2021

Comentada:

el 1 de En. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by