clear: clc: L= 2; g-32.17; F-e (t, Y) Y (2)-(g/L) *sin (Y (1))1: t0 0 ; tf 10 ;
ID: 3348600 • Letter: C
Question
clear: clc: L= 2; g-32.17; F-e (t, Y) Y (2)-(g/L) *sin (Y (1))1: t0 0 ; tf 10 ; n-#1000; h (tf-t0) /n; alpha = [ pi/4 ; 0 ]; [t,y] midpoint (to,h,n, alpha, F); plot (t, w(1, :)):grid on function [t, w] midpoint (to,h, n, alpha, F) w (1:2,1) -alpha; t (1)-to; for 1-1:n KlF (t (i),w (1:2, i)) K2F (t (i) +0.5*h, w (1:2, 1) +0.5*h K1): End end mmand Window w to MATLAB? See resources for Getting Started must be closed with an tend All functions in a script >> midpointi All funetiona in 4 ADE mist be closed vith anExplanation / Answer
Only mistake in the script file is that you have not closed the function properly. You used "End" to close the function. Instead you should use "end" to close it. E must be lowercase.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.