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

24 次查看(过去 30 天)
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 个评论
John D'Errico
John D'Errico 2016-9-20
编辑:John D'Errico 2016-9-20
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 2016-9-20
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...

请先登录,再进行评论。

采纳的回答

Alan Weiss
Alan Weiss 2016-9-20
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 个评论
Max_4137
Max_4137 2016-9-21
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 2018-5-17
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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surrogate Optimization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by