Filter löschen
Filter löschen

plot system in 3-D

1 Ansicht (letzte 30 Tage)
hasan s
hasan s am 9 Mär. 2021
Kommentiert: hasan s am 21 Mär. 2021
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 Kommentare
hasan s
hasan s am 9 Mär. 2021
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 am 9 Mär. 2021
The coordinates x, y, z , or ( A, B, G) THAT I want are all greater than zero

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 10 Mär. 2021
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 Kommentare
Walter Roberson
Walter Roberson am 21 Mär. 2021
Sorry, I do not have the resources to assist you further for the next while.
hasan s
hasan s am 21 Mär. 2021
Ok prof., I appreciate your time,,,,thanks for your previous help

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by