how can we create image through dataset consisting of 702 rows and 1 column?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 22 Mai 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?
Réponses (3)
Walter Roberson
le 26 Avr 2022
I = reshape(Data, 26, 27);
imshow(I, [])
2 commentaires
Walter Roberson
le 27 Avr 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.
Image Analyst
le 22 Mai 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 commentaires
Shruti Awasthi
le 22 Mai 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.
Image Analyst
le 22 Mai 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 commentaires
Image Analyst
le 22 Mai 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.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!