How to create a function that will call a text value to open a file?
2 次查看(过去 30 天)
显示 更早的评论
I am creating a function that needs to have a couple of values associated with a file that it loads and does some processing to. The function looks like this (obviously names changed.)
function [outx,outy] = imstupid(image_filename,var1,var2,var3)
G = imread('filename','bmp');
.Functions
.That
.Already
.Work
end
Sorry if this isn't clear, but basically I need to have image_filename be called as text value that is used in the imread function. Thanks!
0 个评论
采纳的回答
Vishal Rane
2014-6-12
Assuming image_filename contains the complete path (if not on matlab path) or name of image to be read, then
G = imread( image_filename);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!