I have a for loop, but every iteration overwrites the variable and I have only the final data left.. how can I save data from every loop the new images i am having have different matrices when i dicomread them because they are from type uint and not double saves only the last value when R=172. how do I get the other values?
for c=1:172 name1 = strcat(folder_name1,'/',filesStruct1(c).name); alpha = dicomread(name1) R = (((double(alpha).*pi)./(4096)) - (pi./2)) dicomwrite(R, (strcat('Results/',filesStruct1(c).name)));end
please if somebody can help me by editing that on my code, I am kind of using matlab since a few months thanks in advance
Best Answer