Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Problem rearranging vector (a column of a matrix)
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi, similar to the 2048 game, on a 4x4 board with 1's, 2's, 4's and the following power of 2's, I'd like to write a slightly different game to it. The only problem I have is rearranging a vector such that by selecting 'up', c = [1, 1, 0, 4]' turns into c = [2, 4, 0, 0]'. I could use loops but can you think of a way to do it using logical ops?
댓글 수: 1
Image Analyst
2014년 4월 20일
You assume everyone knows the rules and algorithm for the 2048 game. I don't. http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
답변 (1개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!