I would like to convert a MathCAD sheet onto a MATLAB program

48 visualizaciones (últimos 30 días)
Max_4137
Max_4137 el 20 de Sept. de 2016
Comentada: Tommaso el 17 de Mayo de 2018
I have received a previously created work done on MATHCAD but for convenient reasons I would like to convert the same equations using MATLAB.
The MATHCAD I have is a creation of matrices (easily done in Matlab).
Then MATHCAD uses a solver bloc with initialization parameters, equations and the Find() function. I have tried entering the equations and using solve() or vpasolve() in Matlab, but cannot find any suitable match.
I am not sure how to enter some initialization to a solver, or if it is even possible, can you help me?
What would be the best solution to replicate the MATHCAD solver?
  2 comentarios
John D'Errico
John D'Errico el 20 de Sept. de 2016
Editada: John D'Errico el 20 de Sept. de 2016
So? Do it. Answers is not here to do your job for you. If you don't know MATLAB well enough, then someone writing the code for you will not help you, except to enable your actions. It will teach you that you can always get someone to do your work for you. So learn MATLAB. Or don't, and use MATHCAD.
In this case, I would start with at vpasolve, or the optimization toolbox. But unless someone spends the time to do your job, then nobody can really know.
Max_4137
Max_4137 el 20 de Sept. de 2016
Mmm ok, I don't want the answer to be given to me, probably my question was not properly written. It is sometimes hard to find differences between each of the Matlab functions, that's why I'm asking for some guidance...
Don't think the learn MATLAB was the appropriate answer, again I wanted someone to explain me which option I could take, not to give the code that I want to write/understand myself...

Iniciar sesión para comentar.

Respuesta aceptada

Alan Weiss
Alan Weiss el 20 de Sept. de 2016
Perhaps you are looking for the numerical solution of a nonlinear system of equations. If so, take a look at fsolve, an Optimization Toolbox solver.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  2 comentarios
Max_4137
Max_4137 el 21 de Sept. de 2016
Thanks, it looks that the fsolve is the function I was looking for. I need to integrate my loop now, but at least I now define properly the equations and solve them using fsolve. Thanks for your help, much appreciated.
Tommaso
Tommaso el 17 de Mayo de 2018
Hi Alan,
I think I have a problem that looks like Max_4137's.
At the moment I'm trying to convert this simple mathcad code(figure attached) to matlab. Do you know how i could translate it?
Actually i have to find three variables, linked toghether by three constraint functions (f1,f2,f3). Each constraint function equals a constant value (input number + fix constant) but has to depend on the three variables i search. However i don't know this dependence. Matcad solve block find the function which relies the three and solve the system with "find". Is there anything symilar in matlab?
Thank you very much

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by