This is the code in txt format. As nonsense results I mean that as output I get something that does not meet the requirements given by the homework.
[code pasted in below by the Mentors]
function spacecraft_attitude_control_HW2_2025()
clc; clear; close all;
format long;
%%...
Good morning,
I have this homework attached as PDF with also a more explanatory image wrt the one in the PDF.
I tried to solve it (my code is attached below) but I get nonsense results. Could someone explain errors and fix my code? Unfortunately I'm not so good at MATLAB