Hi,
Im trying to compare two arrays - I want to compare each element separately to the corresponding element in the other array and use the answer as part of an if statement. This is what im doing so far that doesnt work:
if PeakEnv >=level
gain = (level/PeakEnv)^0.75
else
gain = 1
end
have also tried putting if PeakEnv(1:88200)>=level but that doesnt work either. it evaluates the whole array and then makes the condition false for the whole thing.
have done the thing with for loops and it works fine but takes ages.
any suggestions??
thanks
jen
Im trying to compare two arrays - I want to compare each element separately to the corresponding element in the other array and use the answer as part of an if statement. This is what im doing so far that doesnt work:
if PeakEnv >=level
gain = (level/PeakEnv)^0.75
else
gain = 1
end
have also tried putting if PeakEnv(1:88200)>=level but that doesnt work either. it evaluates the whole array and then makes the condition false for the whole thing.
have done the thing with for loops and it works fine but takes ages.
any suggestions??
thanks
jen