symbolic math - Undefined function 'sparse' for input arguments of type 'sym'. (Matlab) -


i'm trying create sparse matrix has non-numeric elements.

syms b c;  = [1 1 2 2]; j = [1 2 1 2]; s = [a b 3 c];  sparse(i,j,s,2,2) 

which returns error:

undefined function 'sparse' input arguments of type 'sym'.

error in test2 (line 8)
sparse(i,j,s,2,2)

as stated in comments, there no such thing sparse symbolic matrix in matlab. stated in documentation third input argument form of sparse you're using:

v — values
scalar | vector | matrix

...

data types: double | logical

matlab's symbolic math (and mupad) may take advantage of inherent sparsity internally (for storage , computation).


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -