How to call sigmoid function inside runge kutte orde 4? Is it possibel?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
cindyawati cindyawati
el 3 de Jun. de 2023
Comentada: Image Analyst
el 3 de Jun. de 2023
I have sigmoid function and I want to call that function with runge kutte, how to call function inside function?
0 comentarios
Respuesta aceptada
Image Analyst
el 3 de Jun. de 2023
Editada: Image Analyst
el 3 de Jun. de 2023
To call a function from within another function, just call the function by name and pass it the arguments it wants. For example, to have it call a function called "function2" inside another function called "function1", do this:
function function1()
output = function2(input1, input2, input3);
end
Make sure you give the "inside" function whatever arguments it needs.
To learn other fundamental concepts, invest 2 hours of your time here:
2 comentarios
Image Analyst
el 3 de Jun. de 2023
Why did you not assign values for, and pass the variables in for, K1,K2,M1,M2,M3,O,P,S? Why did you call fRK4M1 with not enough (any actually) input arguments? Did you think MATLAB would just somehow automatically invent values for those variables? It won't. You have to assign them.
What is the name of your m-file? It appears to be fRK4M1.m, which is the name of a nested function. It should be sigmoid.m, which is the outermost function. And you need to assign and pass in M1 when you call sigmoid().
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!