Community Profile

photo

Oscar


Last seen: environ un an il y a Actif depuis 2022

Statistiques

Content Feed

Afficher par

Question


Trying to calculate the outputs for this equation in a for loop, but it only calculates for one input; when g = 1.67
M = 2; g = linspace(1,1.67,4)'; for i = 1:length(g) beta_max = asind((g(i)+1)./(4*g(i))-1./(g(i).*M^2)*(1-((g(i)+1)*(1+(g...

environ un an il y a | 1 réponse | 0

1

réponse

Question


Evaluating the following integral using comp trap method for 2 trapezoids
% I'm trying to evaulate this integral using the composite trapezoid method % The output for the 'I' gives me 8.7797 which mat...

plus d'un an il y a | 1 réponse | 0

1

réponse

Question


I am trying to plot this piecewise function using for loop and if statements, yet I keep receiving error message: Array indices must be positive integers or logical values.
g = 0:0.1:5; C(g) = 0*g; for i = 1:length(g) if g(i) < 2 && g(i) >= 0 ...

plus d'un an il y a | 1 réponse | 0

1

réponse