- http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
- http://www.mathworks.com/matlabcentral/answers/20313-how-to-get-answers-for-my-unanswered-questions
Problem in using Fsolve in Simulink
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to use 'fsolve' in Simulink, and I found the following thread on Mathworks:
I used the same technique as 'Kaustubha Govind' mentioned for a model I am trying to design in Simulink, and I am running into more errors. To give a basic idea about what I am trying to do, I have the following structure. I am using the 'Interpreted Matlab Function' block in Simulink.
fsolve(@(x)sample(x,u(1),u(2),u(3),u(4),u(5),u(6),u(7),u(8),u(9),u(10),u(11),u(12),u(13),u(14),u(15),u(16)),x0)
Here, x0 is a 1 X 12 matrix and u(1)..,u(16) are scalars. 'sample' is a function (m-file) that I have saved in the Matlab folder. To start with, Have I framed the 'Interpreted Matlab function' properly?
After I run this model, I get the following errors:
1) Error in 'Model/Subsystem/Interpreted MATLAB Function' while evaluating expression.
2) Failure in initial user-supplied objective function evaluation. FSOLVE cannot continue.
3) Too many output arguments.
-Krishna
1 comentario
Kaustubha Govind
el 12 de Ag. de 2013
Hi Krishna,
Please avoid sending personal messages, since all forum users participate in their leisure time and are not mandated to do so as an order of business.
Here are some resources that might help with unanswered questions:
If your license is on maintenance, please also note that you may contact MathWorks Tech Support as an alternate resource for urgent issues: http://www.mathworks.com/support/contact_us
Thank you for your consideration!
Respuestas (1)
Kaustubha Govind
el 12 de Ag. de 2013
Are you able to run fsolve with similar input arguments (as passed in from the Interpreted MATLAB Function block) outside of Simulink? Please set a breakpoint in your S-function code to ensure that the inputs are passed in correctly.
2 comentarios
Arcadio Perilla
el 18 de Dic. de 2019
I cannot beleive that this question after 5 years has not been answered :(
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!