converting a binary vector to polynomial form?
조회 수: 4 (최근 30일)
이전 댓글 표시
If i have a binary vector:
x = 1 0 0 1 0 1
how can i convert this to polynomial form:
y = x.^5+x.^2+1
regards.
댓글 수: 0
답변 (1개)
Walter Roberson
2013년 4월 24일
댓글 수: 4
Walter Roberson
2013년 4월 26일
You could just
find(fliplr(x)) - 1
which would, in this example, output 5 2 0
Anyhow, so you are looking for a string output ?
참고 항목
카테고리
Help Center 및 File Exchange에서 Polynomials에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!