Should Behavior of sub2ind() be Different for Symbolic and Numeric Inputs?
Mostra commenti meno recenti
maxrows = 1; r = 1; a = 1; c = 1; ii = false;
D = zeros(3,3,maxrows) % D is a double
D(sub2ind([3,3,maxrows],a(ii),a(ii),r(ii))) = c(ii)
D = zeros(3,3,maxrows,'sym') % now D is a sym
D(sub2ind([3,3,maxrows],a(ii),a(ii),r(ii))) = c(ii)
Why does sub2ind() change the dimension of D in the latter case?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Symbolic Math Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


