how can we create image through dataset consisting of 702 rows and 1 column?

1 visualización (últimos 30 días)
I want to create image from the dataset consisting of 702 rows and 1 column. Can you help me with the matlab code for creating the image?
thanks
  5 comentarios
Walter Roberson
Walter Roberson el 22 de Mayo de 2022
Do you have several of these files, one for each frequency, with the 702 being locations?
Do you have several of these files, one for each location, with 702 being the number of frequencies?

Iniciar sesión para comentar.

Respuestas (3)

Walter Roberson
Walter Roberson el 26 de Abr. de 2022
I = reshape(Data, 26, 27);
imshow(I, [])
  2 comentarios
Walter Roberson
Walter Roberson el 27 de Abr. de 2022
702 pixels can be factored into rectangles in multiple ways. The 26*27 or 27*26 seems most likely, unless the pixels are rgb or unless the image is known to have a 2:3 or 3:2 aspect ratio.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 22 de Mayo de 2022
Attach one of the CSV files. Basically you just read in the CSV file and it's automatically an spectrogram image that can be displayed.
grayImage = readmatrix(csvFileName);
[rows, columns] = size(grayImage)
imshow(grayImage, []);
ylabel('Row', 'FontSize', 18);
xlabel('Frequency', 'FontSize', 18)
  6 comentarios
Shruti Awasthi
Shruti Awasthi el 22 de Mayo de 2022
first column is representing the frequency range (from 3 to 11GHz, with an increement of 0.1 GHz). and rest of the columns are representing 19 different locations. For each frequency, there is different data for the the different 19 locations.
i want the sinlge image.
i forgot the password for the other account, created a new one.
Shruti Awasthi
Shruti Awasthi el 22 de Mayo de 2022
i want the image something like this from my data set.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 22 de Mayo de 2022
Try this:
filename = 'x_19_loc(without).csv';
data = readmatrix(filename);
freq = data(:, 1);
[rows, columns] = size(data)
XData = [1, columns];
YData = [min(freq), max(freq)]
imagesc(mat2gray(data(:, 2:end)));
colormap(gray(256))
% imshow(data(:, 2:end), [], 'XData', XData, 'YData', YData, 'InitialMagnification', 2000000);
grid on;
xlabel('Location')
ylabel('Frequency')
axis('on')
xticks(1:columns)
  3 comentarios
Image Analyst
Image Analyst el 22 de Mayo de 2022
Sorry, I don't know how to wrangle your data into the proper format for further processing. You'll have to figure that out on your own.
Shruti Awasthi
Shruti Awasthi el 22 de Mayo de 2022
okay. no problem.
Thanks for your time and efforts.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by