Filter löschen
Filter löschen

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

11 Ansichten (letzte 30 Tage)
Can you help me create a vector containing multiples of 10? like from 10^-5 to 10^5?

Akzeptierte Antwort

Stephen23
Stephen23 am 1 Jul. 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 Kommentare
Stephen23
Stephen23 am 2 Jul. 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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by