How can plot 1D manifold in 3d space

Hi, I have to plot a 1D manifold based on the equations below, x=[0,0.3], y=[0,1], z=[0,0.5]
other related equations are:
The 1D manifold in 3D space should be something like the red curve in the figure below:
For the convenience, the code of equations are:
g=(0:05).^4./z+(0:05).^4;
x=g;
p=0.255.*(z.^2./z.^2+(0.055).^2);
m1=0.15.^2./(p.^2+0.15.^2);
m2=z.^4./z.^4+0.1.^4;
m3=p.^2./p.^2+0.15.^2;
b=m2.*m3.*x;
a=m1.*(1-m2.*g);
f=1./1+0.4.*(1+a./b);
Thanks in advance for any help.

14 Kommentare

M
M am 21 Jun. 2022
Please let me know if the question is not clear, then I will make it clearer.
KSSV
KSSV am 21 Jun. 2022
What is z?
M
M am 21 Jun. 2022
Bearbeitet: M am 21 Jun. 2022
z is a variable between 0 and 0.5 (approximately)
Torsten
Torsten am 21 Jun. 2022
Bearbeitet: Torsten am 21 Jun. 2022
My guess is that u=0 and v=0 defines your manifold. Is this correct ?
syms x y z
p=0.255*z.^2./(z.^2+(0.055)^2);
m1=0.15^2./(p.^2+0.15^2);
m2=z.^4./(z.^4+0.1^4);
m3=p.^2/(p.^2+0.15^2);
g = 0.05^4./(z+0.05^4);
a = m1.*(1-m2.*g);
b = m2.*m3.*x;
f = 1./(1+0.4*(1+a./b));
u = 0.18*f.*(5.5*y-6.5*z)-0.002*z.^2./(0.01+z.^2);
v = x - 0.05^4./(z+0.05^4) ;
u = subs(u,x,g);
Y = solve(u==0,y)
Y = 
Y = matlabFunction(Y);
z = 0.1:0.1:1;
y = Y(z);
x = 0.05^4./(z+0.05^4);
plot3(x,y,z)
M
M am 21 Jun. 2022
Bearbeitet: M am 21 Jun. 2022
yes, 1D manifold should be plotted based on u=0 and v=0
Torsten
Torsten am 21 Jun. 2022
Bearbeitet: Torsten am 21 Jun. 2022
Then see the plot above.
E.g. the y-z-plane is never reached by the curve because x cannot be 0 on the manifold, only for z=Infinity:
x - 0.05^4./(z+0.05^4) = 0
M
M am 21 Jun. 2022
Thanks @Torsten for the answer, does the figure change if instead of x,y and z that was defined by syms, we use the data attached (curve3d)?
Torsten
Torsten am 21 Jun. 2022
Bearbeitet: Torsten am 21 Jun. 2022
The manifold is given by
y = f(z)
x = g(z)
where z can be prescribed and x and y are derived coordinate values.
How do your curve data come into play here ? Do you want to check how far they are apart from the given manifold ?
M
M am 21 Jun. 2022
yes exactly I want to see which part of this curve are on the curve that I sent its data, but I don't know should we use its data in your code or not
Torsten
Torsten am 21 Jun. 2022
Bearbeitet: Torsten am 21 Jun. 2022
plot3 your data in the same graphics window as the manifold:
% My Code %
hold on
plot3(X,Y,Z)
where X,Y,Z are your 3 columns.
M
M am 21 Jun. 2022
yes I did it..but they don't have common part however I am sure that they should have
Torsten
Torsten am 21 Jun. 2022
Bearbeitet: Torsten am 21 Jun. 2022
Then recheck your equations.
And don't let y become that large by changing the range for z (I did it above).
M
M am 21 Jun. 2022
Sure, thanks again, I will check it and if it works I will accept your answer
M
M am 21 Jun. 2022
Bearbeitet: M am 21 Jun. 2022
@Torsten ,my problem is almost solved with your code, but because your answer is in the comment, I can't accept it as the best answer, so please write it as an answer if you like, then it would be chosen as the accepted answer, thanks.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Torsten
Torsten am 21 Jun. 2022

0 Stimmen

syms x y z
p=0.255*z.^2./(z.^2+(0.055)^2);
m1=0.15^2./(p.^2+0.15^2);
m2=z.^4./(z.^4+0.1^4);
m3=p.^2/(p.^2+0.15^2);
g = 0.05^4./(z+0.05^4);
a = m1.*(1-m2.*g);
b = m2.*m3.*x;
f = 1./(1+0.4*(1+a./b));
u = 0.18*f.*(5.5*y-6.5*z)-0.002*z.^2./(0.01+z.^2);
v = x - 0.05^4./(z+0.05^4) ;
u = subs(u,x,g);
Y = solve(u==0,y)
Y = 
Y = matlabFunction(Y);
z = 0.1:0.1:1;
y = Y(z);
x = 0.05^4./(z+0.05^4);
plot3(x,y,z)

Weitere Antworten (0)

Gefragt:

M
M
am 21 Jun. 2022

Beantwortet:

am 21 Jun. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by