Effacer les filtres
Effacer les filtres

Finding the roots across a range of values

4 vues (au cours des 30 derniers jours)
Tony Stianchie
Tony Stianchie le 7 Mar 2023
Réponse apportée : VBBV le 7 Mar 2023
I'd like to find the roots of b for the array b(i,1) and store those values in BI(i)
H = 0.1;
I = 200;
Y = 0;
b = transpose(1:I);
for i = 1:I
b(i) = fzero(@(b)(b(i)*tan(b(i))-H),b(i));
BI(i) = b(i) ;
end

Réponses (1)

VBBV
VBBV le 7 Mar 2023
H = 0.1;
I = 200;
Y = 0;
b = transpose(1:I);
for i = 1:I
b(i) = fzero(@(b)(b*tan(b)-H),b(i));
BI(i) = b(i) ;
end

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by