Effacer les filtres
Effacer les filtres

Hi! Can you help me create a vector containing multiples of 10? like 10^-5 to 10^5?

10 vues (au cours des 30 derniers jours)
Can you help me create a vector containing multiples of 10? like from 10^-5 to 10^5?

Réponse acceptée

Stephen23
Stephen23 le 1 Juil 2023
"Can you help me create a vector containing multiples of 10? like from 10^-5 to 10^5?"
Guessing that you really mean integer powers of 10:
format short G
V = 10.^(-5:5)
V = 1×11
1.0e+00 * 1e-05 0.0001 0.001 0.01 0.1 1 10 100 1000 10000 1e+05
  3 commentaires
Stephen23
Stephen23 le 2 Juil 2023
"what if I want it to be a column vector?"
format short G
V = 10.^(-5:5).'
V = 11×1
1.0e+00 * 1e-05 0.0001 0.001 0.01 0.1 1 10 100 1000 10000

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by