Hi,
I am trying to run a for loop but it shows me this error "Unable to perform assignment because the indices on the left side are not compatible with the
size of the right side".
The line is error-free when I am running the line without loop. But I need a loop because by replication number here can be 5000.
How can I remove this error?
replication=10;
signal_resolution_merge=2;
for i= 1:replication
Output(i) = sum(reshape(Final_result.nRx_raw_matrix_wout_noise(:,:,(i)), …
signal_resolution_merge, size(Final_result.nRx_avg,2)/signal_resolution_merge));
end
The above code is showing error, but following code is erro-free for any number (1 to 10),
Output = sum(reshape(Final_result.nRx_raw_matrix_wout_noise(:,:,1), …
signal_resolution_merge, size(Final_result.nRx_avg,2)/signal_resolution_merge));
I want to store output values for each replication.
Thank you for your time and considerations.
Best Answer