Evaluate this equation using increments of 0.1 starting from 0
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Antony Bhikh
il 7 Lug 2023
Commentato: Antony Bhikh
il 9 Lug 2023
Lk = 5;
ceq =1;
t=90;
q=0:0.1:0.5;
mq = (((4*sqrt(Lk*ceq))-t)/((2*q*t) - t));
I would like to evaulte mq using values from 0 to 0.5 in incremnts of 0.1. I want all the values stored for both q and mq.
Thanks
0 Commenti
Risposta accettata
Walter Roberson
il 7 Lug 2023
Lk = 5;
ceq =1;
t=90;
q=0:0.1:0.5;
mq = (((4*sqrt(Lk*ceq))-t)./((2*q*t) - t));
plot(q, mq)
Più risposte (1)
Diwakar Diwakar
il 8 Lug 2023
To evaluate mq using values from 0 to 0.5 in increments of 0.1 and store the corresponding values for both q and mq, you can use a loop to iterate over the range of q values and calculate mq for each iteration
Lk = 5;
ceq = 1;
t = 90;
q = 0:0.1:0.5;
mq = ((4 * sqrt(Lk * ceq) - t) ./ ((2 * q * t) - t));
% Display the values
for i = 1:length(q)
disp(['q = ' num2str(q(i)) ', mq = ' num2str(mq(i))]);
end
1 Commento
Walter Roberson
il 8 Lug 2023
instead of the display loop consider using compose() to do the formatting
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
