1
我可以限制一個數組的值小於或大於使用單個值,但我怎麼能限制一個值的數組到特定的範圍。以下代碼約束值到一個數組的範圍
例片斷:
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
但我嘗試添加&> 10,以查看是否我能得到陣列顯示一切比10和下方小於45爲例,更:(但我得到一個錯誤)
arrayphase_sort_limit_idx=arrayphase_sort(:,4)<45**&>10**;
我知道這是一個語法問題,但我不知道正確的語法。 任何想法正確的語法來完成我想要做的事情。
由於