Create an empty symbolic matrix and predefine the dimension in Matlab? -


i want want string calculation using matlab, , stored value in matrix.

for numerical study, predefined dimensions in matlab using zeros create 4*4 array.

a = zeros(4) 

now want same thing symbolic matrix. zeros didn't work @ time.

i tried copy official tutorial @ page http://www.mathworks.com/help/symbolic/sym.html

a = sym('0' ,4)  % error 

still didn't work.

now have use ugly code this

a = sym('[0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 0]'); 

since use iterations, , dimension of matrix grows every time. method not convenient.

do have ideas? lot!

num = sym(num) converts number or numeric matrix num symbolic form.

a=sym(zeros(4,4)) 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -