I want to process each row of a table by a function like [i,j]=f(row). Here is an example, where I am trying to return a sparse matrix:
A=table([ 11 90 -0.023]);B=rowfun(@myfun,A ) function S=myfun(x)data1=[90 1290 11 89];data2=[23 90 12 0];i=find(data1==x(1));j=find(data2==x(2));value=x(3);S=sparse(i,j, value);
Best Answer