setting length of variable

조회 수: 10 (최근 30일)
Keith Holmlund
Keith Holmlund 2018년 7월 5일
답변: Kazeem Issa 2019년 2월 13일
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

채택된 답변

Star Strider
Star Strider 2018년 7월 5일
Yes.
Use the linspace (link) function.

추가 답변 (1개)

Kazeem Issa
Kazeem Issa 2019년 2월 13일
Yes
Use linspance(a,b,n)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by