MATLAB: system of equations (HELP)

Click For Summary
SUMMARY

This discussion focuses on solving a system of equations using MATLAB, specifically for the equations involving trigonometric functions and constraints on the variables \[Theta\] and \[Phi\]. The user seeks guidance on writing MATLAB code to numerically solve these equations, emphasizing the need for a function that accepts the equations and boundary values as inputs. The solution should check for valid outputs within the specified ranges of 0 to 2π for \[Phi\] and 0 to π for \[Theta\]. The discussion highlights the importance of numerical methods in MATLAB for solving complex equations.

PREREQUISITES
  • Familiarity with MATLAB programming language
  • Understanding of numerical methods for solving equations
  • Knowledge of trigonometric functions and their properties
  • Basic concepts of function creation in MATLAB
NEXT STEPS
  • Learn how to implement MATLAB's fsolve function for solving nonlinear equations
  • Research MATLAB's symbolic toolbox for analytical solutions
  • Explore MATLAB's plotting functions to visualize solutions within specified ranges
  • Study boundary value problems in MATLAB for more complex scenarios
USEFUL FOR

This discussion is beneficial for MATLAB users, engineers, mathematicians, and anyone interested in solving complex systems of equations numerically.

ilvreth
Messages
33
Reaction score
0
Hi to all. I have to say at first that i have no idea on MATLAB at all. I want some help.
I want to solve a system of equation for example

Code:
(0.02315352 - 0.0576` Cos[\[Theta]] + 0.01152 Cos[\[Theta]]^3) Cos[\[Phi]] - 0.01152 Cos[\[Theta]] Cos[\[Phi]]^3 Sin[\[Theta]]^2 - 0.001919 Cos[\[Theta]] Sin[\[Phi]] =0

-0.02315352 Sin[\[Phi]] - 0.01152 Cos[\[Theta]]^3 Sin[\[Phi]] + Cos[\[Theta]] (0.00191 Cos[\[Phi]] + 0.0576 Sin[\[Phi]] + 0.01152 Sin[\[Theta]]^2 Sin[\[Phi]]^3) =0

with

Code:
0 <= \[Phi] <= 2 \[Pi]  
 0 <= \[Theta] <= \[Pi]

How the MATLAB code could be written to solve this system numerically?
 
Physics news on Phys.org
You can easily write a function for that. Take the equation and the boundary values as input, solve the equation, check which values are within the range, and return them. Simple.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K