how to remove zeroes and reverse that in a matrix

조회 수: 2 (최근 30일)
Sharen H
Sharen H 2013년 4월 10일
I have considered a matrix with zeros
x=[1 2 3 0
0 0 0 1]
i removed the zeros and the result is
y=[1 2 3 1]
Is it possible to reverse ie obtain x from y..
Please help

채택된 답변

Walter Roberson
Walter Roberson 2013년 4월 10일
No, not unless you have additional information about where the zeros go, and about the shape of the target matrix.
  댓글 수: 3
Image Analyst
Image Analyst 2013년 4월 10일
Sharen: Here's my array [3 5 6 7 2 4 7 1 5]. Can you tell me where the zeros were that I removed? I want you to put them back in the exact spots I took them out of. Do you know where to put them? Hopefully now you understand.
Sharen H
Sharen H 2013년 4월 10일
yes yes thank you

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by