Tout-
Je suis nouveau dans JSL et je veux savoir s'il existe un moyen simple de créer un vecteur d'espace journal - de la même manière que la fonction dans MATLAB ou Numpy.
Merci.
-Alvaro
Salut,
Ce n'est pas intégré, mais heureusement, ce n'est pas difficile, en utilisant la fonction log10 et les matrices. Voici 2 exemples avec une sortie de journal pour chacun.
Acclamations,
Brady
Names Default To Here( 1 );
//ex1: generate 9 logarithmically-spaced points between 10^3 and 10^7
lowExp = 3;
highExp = 7;
logVec1 = 10 ^ (lowExp :: highExp :: ((highExp - lowExp) / 10));
show (round(logVec1, 2));
print("\!n");
//ex2: generate 14 logarithmically-spaced points between 250 and 875
lowExp = log10(250);
highExp = log10(875);
logVec2 = 10 ^ (lowExp :: highExp :: ((highExp - lowExp) / 15));
show(round(logVec2, 2));
