Borrar filtros
Borrar filtros

how does imread know where to look on my computer to find the graphics file?

6 visualizaciones (últimos 30 días)
how does imread know where to look on my computer to find the graphics file? It says file does not exist but it does and is save in a documents folder. In java or html we need to explicitly give the path file to find and read in a file. I have not seen anything that says this for matlab. However matlab can not find my file?? How do I let matlab know where to look?

Respuestas (1)

Ameer Hamza
Ameer Hamza el 15 de Mayo de 2020
Editada: Ameer Hamza el 15 de Mayo de 2020
You can specify the complete path of file with imread()
img = imread('C:\....\imageFile.jpg');
If you don't specify the complete path, then imread() search for the file on MATLAB's path: https://www.mathworks.com/help/matlab/ref/path.html
You can add and remove any folder from MATLAB's path: https://www.mathworks.com/help/matlab/ref/pathtool.html

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by