Find all intercepts for all parameter values

2 visualizaciones (últimos 30 días)
University
University el 11 de Oct. de 2023
Comentada: Matt J el 13 de Oct. de 2023
Hi,
In the attached the fig. I have different intercept for different values of xi. I plotted the figure from COMSOL. Please how can I find all the intercepts in matlab and plot them against xi ?
  5 comentarios
Torsten
Torsten el 11 de Oct. de 2023
And what intercepts are you talking about ? Intercepts with the axis "velocity = 0" ? Intercepts of the curves themselves ?
University
University el 11 de Oct. de 2023
While, at the monent this is velocity component in the y-direction verse the xi plot. I actually want to plot the y_intercept (which is the position) verse the xi. In which case, i need to compute y_intercept.

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 11 de Oct. de 2023
Editada: Matt J el 11 de Oct. de 2023
As an example,
y=linspace(-1,1,1000);
V=sin(pi*y-0.4); %fake input data
loc=diff(sign(V)) & abs(y(1:end-1))<0.5;
yintercept=y(loc),
yintercept = 0.1271
plot(y,V,yintercept,0,'rx'); yline(0);
xlabel y-coordinate; ylabel Velocity
  2 comentarios
University
University el 12 de Oct. de 2023
Hi Matt,
Thank you for your assistant. I will try this
Matt J
Matt J el 13 de Oct. de 2023
You're welcome, but if it works please Accept-click the answer.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by