polari is an array of 1's and 0's. If for example polari was [1, 1, 0, 1] then bipolari=bipolar(polari) would say that you want bipolari to equal [bipolar(1), bipolar(1), bipolar(0), bipolar(1)] and since Matlab indexing starts at 1, the bipolar(0) entry is causing the "Array indices must be positive integers or logical values." error.
If your goal is for bipolari to only equal bipolar at the indexes where polari is 1, then you could do the following:
bipolari=bipolar(logical(polari));