>> %script needed to find distance %given, Time.In = 0.7; rho =1.5; A =1; m = 1700; V.fstream = 96.639; a = 4.1202; v = 0; T = 7004.34; t.initial = 0; %use for loop to find for K = 1 : 50 v(K + 1) = v(K) + a(K) * Time.In; T(K + 1) = 1/2 * rho * A * (V.fstream ^ 2 – v(K) .^2); a(K + 1) = T(K) / m; b(K + 1) = v(K) * Time.In; t(K + 1) = t(K) * Time.In; end % the distance using the sum command distance = sum(b , 'all' )
MATLAB: Hi isnt do I get this error ‘ operator ‘*’ is not supported for operands of type struct’
for loopMATLAB
Best Answer