plot system in 3-D

1 次查看(过去 30 天)
hasan s
hasan s 2021-3-9
评论: hasan s 2021-3-21
Hi
I need to plot in 3-D ,the first equation ,and the second equation, then the third equation
after that plot all in one drawing
if any prof. can help me....thanks a lots....
there is my equations:
And this is my matlab :
N = 1000;
Q1 = rand(10,N);
Q=reshape(Q1,1,[]); % convert matrix to row vector
sum1=0;sum2=0;sum3=0;sum4=0;sum5=0;sum6=0;
for j=1:10000
sum1=sum1+1/(A+(G*B*((Q(j))^(G-1))));
sum2=sum2+(Q(j));
sum3=sum3+(G*((Q(j))^(G-1)))/(A+(G*B*((Q(j))^(G-1))));
sum4=sum4+(Q(j))^(G);
sum5=sum5+(((G*log(Q(j)))*((Q(j))^(G-1)))+((Q(j))^(G-1)))/(A+(B*G*((Q(j))^(G-1))));
sum6=sum6+((Q(j))^(G))*log(Q(j));
end
f(A,B,G)=sum1-sum2;
g(A,B,G)=sum3-sum4;
h(A,B,G)=B*sum5-B*sum6;
plot3d(f(A,B,G)=0,color=red);
plot3d(g(A,B,G)=0,color=yellow);
plot3d(h(A,B,G)=0,color=blue);
display({plotf,plotg,ploth},axes= );
my variable : A,B,G in matlab ...INSTEAD OF x, y, z for the 3-D
what I add to this program to plot all the three eqations, in different colors please, and then put them in one drawing .
I write
plot ( .,)
but I dont know what write between the Parentheses.
  3 个评论
hasan s
hasan s 2021-3-9
I searched a lot and could not find a way to write it in Matlab, and find this in Maple
I thought the same way .
I hope to help me write it in matlab
These are the same equations for the program that you helped me with while you are the person he knows best
I really appreciate your time
If you can help me, thanks a lot
hasan s
hasan s 2021-3-9
The coordinates x, y, z , or ( A, B, G) THAT I want are all greater than zero

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2021-3-10
digits(16);
syms A B G
N = 1000;
Q1 = rand(10,N);
Q = vpa(reshape(Q1,1,[])); % convert matrix to row vector
sum1=0;sum2=0;sum3=0;sum4=0;sum5=0;sum6=0;
for j=1:10000
sum1=sum1+1/(A+(G*B*((Q(j))^(G-1))));
sum2=sum2+(Q(j));
sum3=sum3+(G*((Q(j))^(G-1)))/(A+(G*B*((Q(j))^(G-1))));
sum4=sum4+(Q(j))^(G);
sum5=sum5+(((G*log(Q(j)))*((Q(j))^(G-1)))+((Q(j))^(G-1)))/(A+(B*G*((Q(j))^(G-1))));
sum6=sum6+((Q(j))^(G))*log(Q(j));
end
sum1m2 = vpa(sum1 - sum2);
sum3m4 = vpa(sum3 - sum4);
sum5m6 = vpa(B*sum5-B*sum6);
f = matlabFunction(sum1m2, 'vars', [A, B, G]); %really long
g = matlabFunction(sum3m4, 'vars', [A, B, G]); %really long
h = matlabFunction(sum5m6, 'vars', [A, B, G]); %really long
fimplicit3(f, 'r');
drawnow();
hold on
fimplicit3(g, 'y');
drawnow();
fimplicit3(h, 'b');
However, that fimplicit3 of h takes at least an hour! And the g is in the same place as f it looks like!
  25 个评论
Walter Roberson
Walter Roberson 2021-3-21
Sorry, I do not have the resources to assist you further for the next while.
hasan s
hasan s 2021-3-21
Ok prof., I appreciate your time,,,,thanks for your previous help

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by