Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
help with this basic matlab code..
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Here is a code I wrote,
I want the each file to be cut off
I got right up to cut_2 bit.
But problem comes in Mean_process_cut_cut_image_posi = rot90(cut_2,3);
I want to rotatte the image and want to call it as Mean_process_cut_cut_image_posi
But when I run, in a workspace it only shows
Mean_process_image_pos1
....
Mean_process_image_pos5
and
Mean_process_cut_cut_image_posi
whereas I want to have
Mean_process_cut_cut_image_pos1
Mean_process_cut_cut_image_pos2
Mean_process_cut_cut_image_pos3
I think this should be easy bit... but I am stuck at this for an hour..
Here is my code.
files = dir('*.mat');
for i=1:5
load((['Mean_process_image_pos',num2str(i),'.mat']));
%load(files(i).name);
cut_1 = rot90(Mean_process_image_pos1, 3);
x = 193; %10mm
y = 768 -x;
cut_2 = cut_1(:,x:y);
Mean_process_cut_cut_image_posi = rot90(cut_2,3);
end
stacked_cut_image= [ Mean_process_cut_cut_image_pos5;Mean_process_cut_image_pos4;Mean_process_cut_image_pos3;Mean_process_cut_image_pos2;Mean_process_cut_image_pos1];
0 comentarios
Respuestas (1)
Iain
el 8 de Oct. de 2014
The answer you're looking for is actually really really really horrible:
Mean_process_cut_cut_image_posi = rot90(cut_2,3);
Should be:
eval(['Mean_process_cut_cut_image_pos' num2str(i) ' = rot90(cut_2,3);']);
But that is awful matlab. You should replace it with:
stacked_cut_image(i,:) = rot90(cut_2,3);
1 comentario
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!