Systems equation with a loop

1 vue (au cours des 30 derniers jours)
Ivana Vujkovic Bukvin
Ivana Vujkovic Bukvin le 2 Déc 2019
Hi,
I'm quite new to MATLAB, doing research in biophysics and trying to solve a system of two complex equations for some NMR work. I simplified them in the screenshots. M and D have a range of values, t, K, a, b are constants and x and r are the variables. I need to solve the equations for r, that's my end point.
I want to import M and D values as matrices and I started working on writting the script for the loops. I'm having a bigger problem with solving the equatings and I would appreciate any help to get me started, I don't expect anyone to write me a script, I just need a bit of help. Thank you!Picture 1.png

Réponses (1)

Dhananjay Kumar
Dhananjay Kumar le 5 Déc 2019
Hey,
See these two examples:
  1. Solve System of Equations with vpasolve
  2. Root of Function with fzero
If the value of a parameter is unavailable, then you can use solve function with syms variables, which will give you solution in terms of the parameters. See this example: in.mathworks.com/help/symbolic/examples/solve-equations-in-returnconditions-mode.html#responsive_offcanvas . This method is really cool but might not work with complex equations. In that case MATLAB gives you solutions using the above mentioned vpasolve function.
This example uses Symbolic Math Toolbox, which solves equations symbolicaly (the same way we differentiate/integrate functions on our notebooks to get derivative/integral function in terms of variables).

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by