Can Someone help explain this code below
A(k,i) = m_Data(1,i,k);
A(k,i) = m_Data(1,i,k);
-
this is embedded in two loops
for i=1:N
for k=1:M
yourcodegoeshere
end
end
What it does it take a subset of the m_Data matrix and use it to populate the A matrix. It is inefficient, and should be vectorized.
A(:,:)=(m_Data(1,:,:))'
would live outside the two loops, and could run as much as 12x faster.
for i=1:N
for k=1:M
yourcodegoeshere
end
end
What it does it take a subset of the m_Data matrix and use it to populate the A matrix. It is inefficient, and should be vectorized.
A(:,:)=(m_Data(1,:,:))'
would live outside the two loops, and could run as much as 12x faster.
-
this appears to be a function in matlab. k and i are variables that are to be input by the user.
Depending on the function created, they will result in a specific value.
without seeing the actual function code, it is impossible to tell
Depending on the function created, they will result in a specific value.
without seeing the actual function code, it is impossible to tell