Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
array errors using n
조회 수: 2 (최근 30일)
이전 댓글 표시
still new to matlab, so I'm asked to create an array from -5n to 5n with increments of n/100.
im not sure how to properly incorporate n into the array.
Array = [-5n: n/100: 5n]
댓글 수: 0
답변 (1개)
madhan ravi
2020년 6월 23일
편집: madhan ravi
2020년 6월 23일
n = 3; % a number
Array = -5*n: n/100: 5*n % you were close
% or perhaps
syms n
Array = -5*n: n/100: 5*n
댓글 수: 6
madhan ravi
2020년 6월 23일
Try this:
Array = @(n) -5*n: n/100: 5*n
If you don’t think this is what you want , nothing in MATLAB can give what you want.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!