필터 지우기
필터 지우기

Finding exact point on the surface

조회 수: 7 (최근 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 CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by