I can limit an array to values less than or greater than using individual values but how can I limit an array of values to a specific range.
Example snippet of code below:
arrayphase_sort=sortrows(arrayphase,4); %sort by phase in deg low to high
arrayphase_sort_limit_idx=arrayphase_sort(:,4)<45;% idx to limit array to phase angles under 45 degree
arrayphase_sort_limit=arrayphase_sort(arrayphase_sort_limit_idx,:); %limit array to phase angles under 45 degree
but I tried adding &>10 to see if I could get the array to show everything greater than 10 and less than 45 example below: (but I get an error)
arrayphase_sort_limit_idx=arrayphase_sort(:,4)<45**&>10**;
I know it’s a syntax issues but I’m not sure the proper syntax.
Any idea the proper syntax to accomplish what I’m trying to do.
Thanks
You do it like this:
First line generates a 10×10 matrix of random data, the second line extracts numbers between 10 and 45.