Finding exact point on the surface

12 ビュー (過去 30 日間)
M
M 2023 年 9 月 12 日
コメント済み: M 2023 年 9 月 14 日
Hi all,
I have a 3D surface obtained from the equation y = f(x, z). I'm wondering how I can determine the exact value of z when I have the values of x and y. It's challenging to find the equation for z = g(x, y), which is why I created the surface based on x and z.
Essentially, I have a rectangular region on the x-y plane, and I need to project it onto the surface. To achieve this, I need to calculate the exact z values for each corner of the rectangle based on the given x and y values.
I appreciate any assistance with this.
Thank you!
  3 件のコメント
M
M 2023 年 9 月 12 日
It could be two, I mean surface has two sheets, so I want the value on the lower sheets.
Torsten
Torsten 2023 年 9 月 12 日
Use "fsolve" to solve y - f(x,z) = 0 with known x and y and unknown z.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2023 年 9 月 13 日
z = fzero(@(z)y-f(x,z), [z1,z2])
  7 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 9 月 14 日
Change the initial guess
gamma=5.5;
T=1/(gamma*40);
kh=0.1;
p=0.09;
delta=0.1;
ktau=0.04;
Kc=0.2;
Khat=0.000015;
Kp=0.3;
kb=0.4;
Vs=T*0.9;
v_pmm=T*0.07;
alph0=T*0.003;
alph1=T*0.01;
Ke=14;
ks=0.2;
Kf=T*40;
kplc=0.11;
ki=2;
tmax=200/T;
e=0.0016;
vss=Vs/e;
K=(Khat)/ktau^4;
alpha0=delta.*(alph0)/ktau^4;
alpha1=delta.*(alph1)/ktau^4;
v_pm=delta.*(v_pmm)/ktau^4;
tmaxhat=tmax*ktau^4;
%[c,ct]=meshgrid(0:0.01:10);
%Renamed to constant to h0
% Given values of ct and h0
ct = 0.32;
h0 = 0.18;
A=@(c) (-(vss.*c.^2)./(ks.^2))+((Vs.*K.*gamma.^2.*ct.^2)./(ks.^2))+alpha0+alpha1.*((Ke.^4)./(Ke.^4+(gamma.*ct).^4));
h=@(c) (-0.4.*A(c).*((Kc.^4).*(Kp.^2))./((p.^2.*c.^4.*gamma.*ct.*Kf)));
% Define a function for the equation to solve
equation_to_solve = @(c) h(c) - h0;
% Initial guess for c
c0 = 0.010663;
% Use fzero
z_optimized = fzero(equation_to_solve, 0.5);
disp(['The optimized z value is approximately z = ', num2str(z_optimized)]);
The optimized z value is approximately z = 0.2563
M
M 2023 年 9 月 14 日
Thanks, it works, but I don't know how to accept your answer since it's in a comment, not seperated answer.
Could you please look at this question as well, it is similar to this but the point is that I have line there not points.
https://au.mathworks.com/matlabcentral/answers/2020676-how-do-i-project-a-rectangular-plane-onto-the-surface

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by