Feeds
提问
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...
3 years 前 | 1 个回答 | 0
1
个回答提问
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...
3 years 前 | 1 个回答 | 0
1
个回答提问
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 ...
3 years 前 | 1 个回答 | 0