Question: This is the problem:

I have a matrix with `MxN` size and I want divide it into a cell of size `1xM`, but each row `M` of the cell contains an array of size `1xNi` (this means the arrays have different size).

I am trying to do this using mat2cell function but I want to avoid using loops and I don't know how to do it.

I will try to explain my problem with an example. Suppose that I have a matrix

```
X = [1,4,6,9; 2,3,6,7; 5,9,8,7; 9,8,7,10]

```

What I want the code to do is take the values `X<=6` of each row and put them in a `1xM` cell. So the answer should be:

```
ans =

C{1} = [1,4,6]
C{2} = [2,3,6]
C{3} = [5]
C{4} = []

```

So far I have created a loop which goes through all rows of the matrix to find the elements that meet the condition:

```
for i = 1:Mrows
    C{i} = X(i,X(i,:)<=6,:);
end

```

This gives me the result I want but it takes too much time specially when the size of the matrix is very big.

Answer: 
> 
> How to get real path from above URI
> 
> 
> 

Content provider's URI does not need to be resolvable to any existing file. There's no requirement for that so while you may save what CP served to file if you need to, Content Provider may serve it as it likes i.e. by generating the content, fetching-from-net-while-serving, anything else. Also, in case there's file (i.e. cache) it may not be accessible to your process. 

Further read: <https://developer.android.com/guide/topics/providers/content-providers.html>
I have had the same problem for quite some time now. I found out that it occurred with Android 7 (API 25). With API 23 my code for opening a file from dropbox (for example) with the Intent selector works fine. There is no filecache involved. With Android 7 it is just broken. My failing test with API 25 is on a AVD Nexsu. May successful test with API 23 is on a Samsung J5. So it may also be a problem with devices other than Samsung as stated above in the comment.