이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
for the given code:
primpoly = 1 0 1 1
m = 4( assumed)
indx = [0:1:2.^m-1]; %power index
for r = 1:length(indx)
U = gftuple(indx,primpoly,p)
end
I want U to be listed out in a p.^m-1 by m+1 array and not separately. so that i can access each row of U for further computation. but with the above i get U separately for each loop run and the previous U is over-written.
Also, Can i code it without using gftuple, like without any built-in function?
채택된 답변
Walter Roberson
2013년 4월 20일
U(r,:) = gftuple(indx,primpoly,p);
댓글 수: 10
this generates only one U at the end several times. I want all possible U's generated by the loop to be saved up in ONE matrix/table. the o/p here is:
U =
1 0 1
1 0 1
1 0 1
1 0 1
1 0 1
1 0 1
1 0 1
1 0 1
several times! which is not the desired output.
U(r,:) = gftuple(indx(r),primpoly,p);
Malik
2013년 4월 20일
yes this gives the right output but several times if i do not put ';' this means U is being produced several times, cant it be reduced to just once....n Thanks!
Walter Roberson
2013년 4월 20일
Sorry, I do not have the Communications Toolbox to test with.
Are all of the output U's exactly the same? When there is an assignment to part of an array and you do not have a semi-colon, MATLAB outputs the entire array.
the output U is as follows:
U =
1 0 0
0 1 0
0 0 1
1 0 1
1 1 1
1 1 0
0 1 1
1 0 0
But my objective was to call this U once but here this U gets repeated 8 times (the exact same U, dont know why).
Is your code line literally
primpoly = 1 0 1 1
instead of
primpoly = [1 0 1 1]
??
I do not know why the output would be exactly the same each time when indx(r) is used, but I do see in the documentation that you do not need the loop.
U = gftuple( indx(:), primpoly, p )
Notice passing in a column of indices instead of the row you were using.
Malik
2013년 4월 20일
well U = gftuple( indx(:), primpoly, p ) actually works! Thanks! and yes it is supposed to be [1 0 1 1].
Malik
2013년 4월 20일
Is there some way to code this gf tuple function without using the built-in function?
Walter Roberson
2013년 4월 20일
Probably, but I have not researched to find out what the expected output would be.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Error Detection and Correction에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
