フィルターのクリア

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 Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by