Matlab function equivalent to seqa()

조회 수: 5 (최근 30일)
Adrian Austin
Adrian Austin 2019년 2월 8일
댓글: Adrian Austin 2019년 2월 9일
Is there a Matlab function equivalent to seqa()
  댓글 수: 1
John D'Errico
John D'Errico 2019년 2월 8일
seqa?
If you want help, you need to give people a clue what it does. Yes, maybe you know what jargon or acronym this refers to, but others may not.

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

채택된 답변

Star Strider
Star Strider 2019년 2월 8일
If you are talking about this:
x = seqa(start, step, count);creates a sequence of 'count' numbers starting at 'start' and increasing by 'step'.
(see GAUSS Quick Reference (link) for details), in MATLAB, it would be the colon (link) operator.
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 2월 8일
Note that colon is colon(start, step, stop) not (start, step, count) . The stop point might not be included in the list for colon: for example 1:2:3.141 will include 1 and 3, but will not include 3.141 in the list.
There is also linspace, which is linspace(start, stop, count). The stop point is always included in the list unless count is less than 1; the start point is always included in the list unless count is less than 2 (so if the count is one, the stop will be included by the start will not be.)
Adrian Austin
Adrian Austin 2019년 2월 9일
Thank you for your help. I am going through some Matlab code that seems to have been improperly translated from Gauss.

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2019년 2월 8일
Taking the hint from your gauss tag to find https://www.aptech.com/resources/gauss-quick-reference/
seqa = @(start, step, count) start + (0:count-1)*step;
  댓글 수: 1
Adrian Austin
Adrian Austin 2019년 2월 9일
Thank you for your help. I am going through some Matlab code that seems to have been improperly translated from Gauss.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by