Solving a equation for the X value with the given Y value

7 visualizaciones (últimos 30 días)
Hi all,
I have a function like this "y = @(x) (x./E) + (x./K).^(1/n);" with E = 209000, K = 1230, n = 0.1610 respectively. Basically, it is a Ramberg-Osgood equation. How can I solve it with the input of y = [0:0.0006:0.006] for x value?
Thanks in advance.
Kon
  2 comentarios
madhan ravi
madhan ravi el 2 de Abr. de 2019
y(0:0.0006:0.006) %?
Yat Sheng Kong
Yat Sheng Kong el 2 de Abr. de 2019
Hi ravi,
Thanks for your comment. Then I get a very small value like "0 2.87081339712919e-09 5.74162679425837e-09 8.61244019138756e-09 1.14832535885167e-08 1.43540669856459e-08 1.72248803827751e-08 2.00956937799043e-08 2.29665071770335e-08 2.58373205741627e-08 2.87081339712919e-08" in which I think it used this "y(0:0.0006:0.006)" as x-value for y output. What I try to obtain is the opposite way. The value of input of 0.0006, the output should be around 122.7.
Capture.JPG

Iniciar sesión para comentar.

Respuesta aceptada

madhan ravi
madhan ravi el 2 de Abr. de 2019
Result=zeros(numel(y),1);
for k=2:numel(y)
Result(k)=fzero(@(x)(x./E) + (x./K).^(1/n)-y(k),100*k);
end
  2 comentarios
Yat Sheng Kong
Yat Sheng Kong el 2 de Abr. de 2019
Thanks for this and I really appreciated it. By the way, can I know how to determine the initial value x0?
madhan ravi
madhan ravi el 2 de Abr. de 2019
It’s just a guess, plot using fplot() to get an idea.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by