Looking to Solve these equations using matlab

Hi, I am looking to recreate this code in matlab. I need to solve these equations to obtain the answers to T1-T10 and hr1-hr10. I have tried a big solve function and that has not worked. Can anyone point me in the right direction? Thanks

댓글 수: 6

You will never solve this system of equations in the form of an analytical solution, thus in terms of radicals. So using solve is a waste of time. Sorry.
Use fsolve or vpasolve. We won't write the code for you though. In any case, you effectively have 30 unknowns, since A1,A2,...A10 are unknown variables. Just because you appear not to care about the value of those parameters, they are still unknowns.
ok, I appreciate the advice. I combined the 30 equations down to 10. So now I have 10 equations 10 unknowns. Using an fsolve I get the error "Too many output arguments"
But I don't know what you did in calling fsolve. The error message just means you did not set up the call to fsolve properly. If you show what you did, we could help.
Still learning matlab...
In general, it is better to paste in actual code (or upload a *.m file), rather than an image, so that people can copy & paste the code into MATLAB.
I would suggest vpasolve.
However I am not going to bother typing that all in by hand. I recommend posting as text rather than as image

댓글을 달려면 로그인하십시오.

답변 (1개)

Brandon Eidson
Brandon Eidson 2017년 3월 15일

0 개 추천

Hey Justin, it looks like John has guided you to a good approach.  You should be able to use "fsolve" to calculate a solution.  You should refer to its documentation (linked to below) to determine how to best apply it to your situation.  
The link specifically takes you to the section that describes the function outputs.  You should notice that you do not need all those output arguments.  Pick a single variable to store the "fsolve" function's output.  In your case, that single variable will store a vector.
You should also pay close attention to how to pass an equation to "fsolve".  Under the description of the "fsolve" function's inputs, you will see an example of how to create a function handle.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2017년 3월 10일

댓글:

2017년 3월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by