how to solve equations ?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kanav Vij
am 25 Jun. 2015
Beantwortet: Karam Daher
am 2 Mai 2021
I want to solve equations sin(x) and straight line y=0.5, in a specified domain, for example: I want to solve y=sin(x) and y=0.5 in domain 0<x<360, and get the intersecting points.
0 Kommentare
Akzeptierte Antwort
Mischa Kim
am 25 Jun. 2015
Bearbeitet: Mischa Kim
am 25 Jun. 2015
Symbolically,
syms x
solve(sin(x) - 0.5 == 0,x)
ans =
pi/6
(5*pi)/6
Numerically,
myfun = @(x) sin(x) - 0.5;
fsolve(myfun,0) % guess: 0
ans =
0.523598768728013
For other numeric solutions you need to adjust the guess value.
1 Kommentar
Weitere Antworten (1)
Karam Daher
am 2 Mai 2021
Write a program that finds the smallest even integer that is divisible by 13 and by 16 whose square root is greater than 120. Use a loop in the program. The loop should start from 1 and stop when the number is found. The program prints the message “The required number is:” and then prints the number.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!