From: Abhishek on
Hi

I have TL9 as a cell array of class char, a cell array TL3 of class char and a cell array TL4 of class double ...
I am doing
for j=1:d-4
TL7(j)=subs(TL9{j},{TL3{q:r}},{TL4{q:r}});
end

which shows the error
??? Error using ==> sym.double
DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.

Error in ==> sym.colon at 20
n = double((b-a)/d);
why is this error because i am using the similar class arrays and substituting in the similar way which does not show any error??
And please tell me a solution to this problem
>thank you
From: Walter Roberson on
Abhishek wrote:

> I have TL9 as a cell array of class char, a cell array TL3 of class char
> and a cell array TL4 of class double ...
> I am doing for j=1:d-4
> TL7(j)=subs(TL9{j},{TL3{q:r}},{TL4{q:r}});
> end
>
> which shows the error ??? Error using ==> sym.double
> DOUBLE cannot convert the input expression into a double array.
> If the input expression contains a symbolic variable, use the VPA
> function instead.


That error is telling you that either q or r is symbolic and contains a
symbolic variable. In order to do TL3{q:r} you need them to be numeric.