Scale X and Y separately in a matrix
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a matrix of an image. I want to scale the x axis of the matrix by keeping y the same. (Like stretch the image only in X keeping Y the same). I'm thinking of using the aspect ratio (X/Y). But by multiplying the whole matrix by the aspect ratio doesn't give the result I want. Is there a way to do this.
Thanks
2 个评论
Adam
2019-7-16
doc interp2
will allow you to change the sizes of x and y independently. Just use the same y grid for output as you did for input and choose your new x grid to be what you want.
Or just
doc imresize
should work, unless I am misunderstanding what result you are expecting.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!