Azzera filtri
Azzera filtri

Readjust a camera data set

4 visualizzazioni (ultimi 30 giorni)
Grace
Grace il 3 Feb 2022
Risposto: Bhanu Prakash il 15 Lug 2024 alle 15:08
I have a data set of size 2000*300*20. It is a data from a camera with 2000 pixel.
I want to extract out the last data set in the x and y cordinates i.e. at 300 and 20.
Afterwards, I want to use it to replace all the data points of all other x and y components.
I have made some attempts but with no success, I will attached my code for any for useful comments. Thanks
m=size(A.Volume); % A data of size; 2000*300*20
new_A.Volume=A.Volume;
for i = 1:m(2);
for j = 1:m(3);
new_A.Volume(i, j)=A.Volume(:,m(2),m(3));
end
end

Risposte (1)

Bhanu Prakash
Bhanu Prakash il 15 Lug 2024 alle 15:08
Hi Grace,
It seems that you are assigning a 2000x1 matrix (size of A.Volume(:,m(2),m(3))) to a single element of 'new_A.Volume(i, j)', which is leading to the error.
To resolve this, you can use 'new_A.Volume(:, i, j)' instead of 'new_A.Volume(i, j)'. This will replace each data set of 'new_A.Volume' with the last data set of 'A.Volume'.

Categorie

Scopri di più su Audio I/O and Waveform Generation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by