setting length of variable

10 visualizzazioni (ultimi 30 giorni)
Keith Holmlund
Keith Holmlund il 5 Lug 2018
Risposto: Kazeem Issa il 13 Feb 2019
I have three variables of varying ranges such as
a = 1:10
b = 100:4000
c = 1:4
Is there a way to make sure no matter what the range for a,b,and c are, they have the same number of elements in each array

Risposta accettata

Star Strider
Star Strider il 5 Lug 2018
Yes.
Use the linspace (link) function.

Più risposte (1)

Kazeem Issa
Kazeem Issa il 13 Feb 2019
Yes
Use linspance(a,b,n)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Tag

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by