My code reads raw data from a file (that ends with .raw) and assigns arrays from the raw data such as data = raw (1:512, 1:128) but when I display this data with the statement as follows: imshow(data, 'Parent', handles.ax), the x-axis and y-axis data were displayed in reverse. How can I switch those x-axis and y-axis data? It s probably very simple but can't seem to find a good example in this newsgroup!

답변 (1개)

Iain
Iain 2014년 1월 24일
편집: Iain 2014년 1월 24일

1 개 추천

I'm not sure what your exact issue is.
The right combination of functions "view", flipud, fliplr, and transpose: data' should be able to handle whichever flipping you'd like.

댓글 수: 2

Rita Owens
Rita Owens 2014년 1월 24일
I don't want to rotate or move the image around since when I attempt to zoom it, it won't work if it is rotated around. Just switch x and y axis data.
Then simply transpose the data before plotting it?
data = raw(1:512,1:128);
data = data' ;

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

카테고리

도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품

질문:

2014년 1월 24일

댓글:

2014년 1월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by