improve this function in terms of speed
조회 수: 3 (최근 30일)
In my simulation this function is called many time and I would improve in terms of speed this function so I can earn in execution time this is the function
function [ruffled_head] = ruffle_head(head_rcv)
ruffled_head = head_rcv(randi(length(head_rcv));
if ruffled_head ~= 0
this function receives a vector that is made of integer values and also zeros. it should return an integer value different from zero. I think that this function could be better.Any idea how to improve?