Take the 2-minute tour ×

i need help understanding what I'm doing wrong in the following MATLAB code:

h=[6 6];


syms z


z =


as you can clearly understand I want the numeric values... not indexes...

any assistance is welcome

(I know this equation is actually 'z=0' but its just an example, not the real equation that needs solving...)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You can put the actual values in the string passed to solve:

z=solve([ num2str(h(1) * zi(1)) '+z=0'])
share|improve this answer
MATLAB output: Error: Unbalanced or unexpected parenthesis or bracket. –  nrz Dec 21 '12 at 19:42
@nrz: oops, sorry about that. I fixed it now. –  Ben Voigt Dec 21 '12 at 20:29
thank you! very helpful! –  Igal Osetinsky Dec 21 '12 at 20:31

Your Answer


