Azzera filtri
Azzera filtri

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

10 visualizzazioni (ultimi 30 giorni)
Can you help me create a vector containing multiples of 10? like from 10^-5 to 10^5?

Risposta accettata

Stephen23
Stephen23 il 1 Lug 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 Commenti
Stephen23
Stephen23 il 2 Lug 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

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by