Index exceeds the number of array elements (111)(this is error)
Show older comments
hello everyone,
I have two queries.
- I want to calculate the average of all maxvalue
- i want to find the time of occuarances of each value. this output (res_signal_example.plot1_x_time) contains the time value.
I am working with output value to calculate the transmission delay of getting each peak value.
this are my code.
res_signal_example = EXAMPLE_runner_00_SingleBurst_S2S( )
% particle tracking based (SLOW)
%value = max (res_signal_example.nRx_raw_matrix_wout_noise, [], [1 2])
for k=1:size(res_signal_example.nRx_raw_matrix_wout_noise,3)
a=res_signal_example.nRx_raw_matrix_wout_noise(:,:,k);
[maxv,idx]=max(a(:));
[ii,jj]=ind2sub([size(res_signal_example.nRx_raw_matrix_wout_noise,1) size(res_signal_example.nRx_raw_matrix_wout_noise,2)],idx);
value{k}=[maxv ii jj]
end
celldisp(value);
Following image is the total output of my simulation. I am working with MUCIN simulator. plot1_x_time(1*1000) is the time of occurances of each peak value. I have 111 peak values (1*111). i need to find the time of values in plot1_x_time. I need 111 time value for each peak values.


5 Comments
Guillaume
on 28 Jan 2019
You're complicating your life by working on nRx_raw_matrix_wout_noise as if it was 3D when it is actually 2D (dimension 1 is singleton).
With regards to your question, it's really not clear how your plot1_x_time, a vector with 1000 elements relates with a matrix of size 2000x111. None of the sizes match, If plot1_x_time had 2000 elements, your question would make sense. As it is, you need to explain how the two are related.
Tania Islam
on 29 Jan 2019
Tania Islam
on 29 Jan 2019
Guillaume
on 29 Jan 2019
Yes, I understood more or less what your data represent. The problem is that you have 2000 values but only 1000 times, so it's not clear how you find the timing of a value.
Tania Islam
on 29 Jan 2019
Edited: Tania Islam
on 29 Jan 2019
Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!