how to change Function value intiialization? mine is start with 0. i want start with -1
조회 수: 1 (최근 30일)
이전 댓글 표시
f = zeros(1,length(t));
댓글 수: 0
채택된 답변
John D'Errico
2017년 12월 10일
The trivial answer is to subtract one from the array of zeros.
Or, replace the zeros with -1. Thus
f(:) = -1;
Or, learn to use the function ones. It works just like zeros. Multiply by -1.
Or, learn to use repmat. Thus repmat(-1,[1,nt]).
Or many other solutions.
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!