How to generate a restricted matrix

조회 수: 2 (최근 30일)
Michael
Michael 2013년 11월 12일
댓글: Michael 2013년 11월 12일
I need to generate a matrix
v=[x;x^2;x^3;...;x^n]
Where n is any positive integer. If the n is very large, say 100, is there anyway to type it easily? Thank you.

채택된 답변

The Matlab Spot
The Matlab Spot 2013년 11월 12일
say,
c = 2;
b = 1:10;
>>v = c.^b

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by