필터 지우기
필터 지우기

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