Borrar filtros
Borrar filtros

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

10 visualizaciones (últimos 30 días)
Can you help me create a vector containing multiples of 10? like from 10^-5 to 10^5?

Respuesta aceptada

Stephen23
Stephen23 el 1 de Jul. de 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 comentarios
Stephen23
Stephen23 el 2 de Jul. de 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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by