diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2024-12-21 20:11:19 +0100 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2024-12-21 20:11:19 +0100 |
| commit | 26f9500d3fe5073788354102d157cc5e7978c740 (patch) | |
| tree | 3ceeef96fd8e6f693f7012fa8bb5b8efaf9f0b6b /Scripts/hw11/hw11.m | |
| parent | d94f8b703beb9c671631f6b065e749b84378ba77 (diff) | |
Renamed and re-organized files in Scripts/ directory
Diffstat (limited to 'Scripts/hw11/hw11.m')
| -rw-r--r-- | Scripts/hw11/hw11.m | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Scripts/hw11/hw11.m b/Scripts/hw11/hw11.m deleted file mode 100644 index 312e816..0000000 --- a/Scripts/hw11/hw11.m +++ /dev/null @@ -1,29 +0,0 @@ -% Define problem constants -g = 9.81; -mu = 0.55; -F = 150; -m = 25; - -% Define the function to be solved for. Is the angle specified in radians or degrees? -%angle=@(-asin(g/(sqrt(mu^2)))+atand(mu)+((4*n2+1)*pi)/2 -func=@(angle) mu*m*g/(cosd(angle)+mu*sind(angle))-F; - -% THINK, what makes range sense for angle? -lower_bound=-90; -upper_bound=90; - -% Plot your function. Does plotting give you an idea about where the root is? -hold on -fplot(func) -fplot(0) - -% Finaly solve for the root using the bisection script given to you, which can be called as: -%[root, fx, ea, iter] = bisect(func, lower_bound, upper_bound); - -angle = bisect(func,lower_bound, upper_bound) - -% These variables will be checked for your final answer: -%angle = % the angle in degree that solves this problem -fx = func(angle) % the function value at your solved angle -ea = ea % the bisection error estimate -iter = iter % the number of bisection iterations
\ No newline at end of file |
