0

In follow-up to a question of mine from yesterday, I tried to do the following:

For the b0, bq+1 and B I did:

 bq1 = [];

for (i=1:length(Mte(1,:,3)))

t = sym(['bq' int2str(i)]);

bq1 = [bq1; t];

end

I then ran:

>> solve(H_tot_te*b == Mte(:,:,Q)*bq1 + lvec + Mprime*B1)
Error using char
Conversion to char from logical is not possible.

Error in solve>getEqns (line 245)
  vc = char(v);

Error in solve (line 141)
[eqns,vars,options] = getEqns(varargin{:});

So I tried:

>> solve(double(H_tot_te*b == Mte(:,:,Q)*bq1 + lvec + Mprime*B1))
Error using strcmp
The number of rows of the string matrix must
match the number of elements in the cell.

Error in solve>getEqns (line 246)
  if any(strcmp(vc, {'IgnoreAnalyticConstraints', 'IgnoreSpecialCases', ...

Error in solve (line 141)
[eqns,vars,options] = getEqns(varargin{:});

What does this error mean, and how I can fix it?

Community
  • 1
  • 1
yankeefan11
  • 485
  • 1
  • 6
  • 18
  • 1
    A side note: http://stackoverflow.com/questions/14790740/using-i-and-j-as-variables-in-matlab – David K Jul 31 '13 at 19:00
  • Yeah. I havent put it into the script yet, so I will make sure to not use i or j – yankeefan11 Jul 31 '13 at 19:01
  • Your use of `i` is perfectly fine. Why do you think the code at the top is responsible for the error? It's pretty hard to figure stuff out when only given bits of the actual code. Calling double on your entire symbolic equation won't fix anything. Does your version of `solve` even support the `==` non-string style equations (old ones don't)? – horchler Jul 31 '13 at 21:18

0 Answers0