How do I switch x and y axes?
8 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(1 个)
Iain
2014-1-24
编辑:Iain
2014-1-24
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 个评论
Iain
2014-1-24
Then simply transpose the data before plotting it?
data = raw(1:512,1:128);
data = data' ;
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Visual Exploration 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!