Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Construct image from given file

1 visualización (últimos 30 días)
Nada Zamri
Nada Zamri el 13 de Oct. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
these are the codes of my script to open the attached file
f= fopen('d20160413.txt');
c = textscan(f,'%s','delimiter','\n');
fclose(f)
c = c{:};
[~,~,~,v] = regexp(c,'\d*\.\d+E[\-\+]\d{2}')
out = reshape(str2double([v{:}]),27,[]);
however, i cannot construct the image from the code. I have used imshow(out) to get the image but it doesnt work.
  5 comentarios
Nada Zamri
Nada Zamri el 13 de Oct. de 2016
Editada: Nada Zamri el 13 de Oct. de 2016
The original file is in the mcc format which can be opened using notepad,but all the data were scattered, so I arranged it and put all the numerical data in the form of matrix. and yes it works, thanks to Mathworks for providing the code. But to get the image,I tried to used imshow(out), however, the image obtained is quite small,I have also opened the original file which is in mcc format using software verisoft and the image is bigger than what I have obtained using matlab and it also in color maps not in grayscale.
I used 27x27, because I counted it manually and all the numerical data fits to be put in the matrix of 27x27.
Walter Roberson
Walter Roberson el 13 de Oct. de 2016
27 x 27 is all that is in that file. You can imshow() it with an InitialMagnification to show in a larger window, but there just isn't more data there.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by