symbolic icon indicating copy to clipboard operation
symbolic copied to clipboard

arrayfun with symbolic array

Open Micky71 opened this issue 3 years ago • 1 comments

I wanna delete the symvars in ‘ex’ from the ‘others’

syms x y z ;others=[x,y,z]; ex=[x,y]; idx=cellfun(@(x) isempty(find(ex==x)),num2cell(others)); left=others(idx);

Thats works for me, but

idx=arrayfun(@(x) isempty(find(ex==x)),others);

error: Python exception: AssertionError: Matrices in input must all have the same shape occurred at line 12 of the Python code block: assert q.shape == A.shape, “Matrices in input must all have the same shape” error: called from pycall_sympy__ at line 178 column 7 elementwise_op at line 99 column 5 ineq_helper at line 35 column 5 eq at line 91 column 5 @ at line 1 column 15

doesn’t work.

Micky71 avatar May 27 '21 03:05 Micky71

After looking a little at this in Octave and Matlab, I think this needs to be fixed in Octave technically.

I've filed bug #60680 upstream to fix this.

mtmiller avatar May 27 '21 22:05 mtmiller