blooz
Advanced Member level 2
Code:
for i=1:2048
temp=dec2hex(i,3);
size(temp)
if(strcmp(temp,addr))
mem(i)=data;
else
mem(i)='000';
end
end
but it's not working
??? In an assignment A(I) = B, the number of elements in B and
I must be the same.
Error in ==> f at 43
mem(i)='000';
error reported
The aim of the script was to read a file and produce an output file where addr is variable of range 000 to 7FF and similarly data could be a random value of range 000 to FFF,
the approach was
for i=1 to 2048
if(i==addr)
mem(addr)=data;
else
mem(addr)=000;
mem(addr)=