I want to making a vactor.
The value of the vector is {-L, -L+1, ..., 0,... L}
I used randperm but this fuction only make {1,2,...,L}

댓글 수: 1

Jan
Jan 2017년 4월 24일
편집: Jan 2017년 4월 24일
Please post the code and the wanted output. Do the curly braces mean, that you work with cell arrays?

댓글을 달려면 로그인하십시오.

 채택된 답변

Jan
Jan 2017년 4월 24일

1 개 추천

Perhaps:
L = 14;
V = -L:L;
or
V = -L:L;
V = V(randperm(numel(V));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 線形代数에 대해 자세히 알아보기

태그

질문:

2017년 4월 24일

답변:

Jan
2017년 4월 24일

Community Treasure Hunt

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

Start Hunting!