From: Walter Roberson on
Abhishek wrote:
> Out1 is the cell array of cells .Does that causes this error ?

Yes.

> So tell me how to get out of it?

I'm not certain, but I think:

temp = horzcat(Out1{:});

then use temp{:}

Better yet, don't create it as a cell of cells in the first place.
From: Abhishek on
syms A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z S1
fid=fopen('/sim/TLV1117LV_DS/x0138322/scripts/userinput1.m');
i=1;
while(1)
tline1 =fgetl(fid);
if isempty(tline1), break, end
TL1{i}=tline1;
i=i+1;
end
fclose(fid);
for k=1:i-2
eq(k)=TL1(k+1);
end
eq1=num2cell(eq);
Out1 = regexp(TL1{1},'\w*','match');
S=solve(eq1{:},temp{2:end});
Vout=S.x;
Vin=z;
H=Vout/Vin;
This code I am running for the file user input1.m which contains
'z,x,o,p,q,r,s,t,u,v,w,T'
'A*p+B*u'
'y*p+D*q+E*r+F*s'
'G*q+H*r+I*t'
'J*q+K*s+L*x'
'M*r+N*o+O*t+2*x*P'
'x*Q+R*o+S1*s+P*t+U*T+V*z'
'W*o+N*t+X*T+R*2*x+Y*v'
'd*w+e*v+f*u'
'g*u+h*p+i*w+j*v'
'k*v+l*o+m*w+n*u'
'Z*T+2*x*a+b*z+c*o'

where z is the input and x is the output ;
This code is not working as solve function gives error ...
please tell me the changes to be made
From: Walter Roberson on
Abhishek wrote:
> syms A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g
> h i j k l m n o p q r s t u v w x y z S1
> fid=fopen('/sim/TLV1117LV_DS/x0138322/scripts/userinput1.m');
> i=1;
> while(1) tline1 =fgetl(fid);
> if isempty(tline1), break, end
> TL1{i}=tline1;
> i=i+1;
> end
> fclose(fid);
> for k=1:i-2
> eq(k)=TL1(k+1);
> end
> eq1=num2cell(eq);
> Out1 = regexp(TL1{1},'\w*','match');
> S=solve(eq1{:},temp{2:end});
> Vout=S.x;
> Vin=z;
> H=Vout/Vin;
> This code I am running for the file user input1.m which contains
> 'z,x,o,p,q,r,s,t,u,v,w,T'
> 'A*p+B*u'
> 'y*p+D*q+E*r+F*s'
> 'G*q+H*r+I*t'
> 'J*q+K*s+L*x'
> 'M*r+N*o+O*t+2*x*P'
> 'x*Q+R*o+S1*s+P*t+U*T+V*z'
> 'W*o+N*t+X*T+R*2*x+Y*v'
> 'd*w+e*v+f*u'
> 'g*u+h*p+i*w+j*v'
> 'k*v+l*o+m*w+n*u'
> 'Z*T+2*x*a+b*z+c*o'
>
> where z is the input and x is the output ;
> This code is not working as solve function gives error ...
> please tell me the changes to be made

What is temp in the code?
And does the input1.m file have those literal quotation marks?
From: Abhishek on
> Abhishek wrote:
> > syms A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g
> > h i j k l m n o p q r s t u v w x y z S1
> > fid=fopen('/sim/TLV1117LV_DS/x0138322/scripts/userinput1.m');
> > i=1;
> > while(1) tline1 =fgetl(fid);
> > if isempty(tline1), break, end
> > TL1{i}=tline1;
> > i=i+1;
> > end
> > fclose(fid);
> > for k=1:i-2
> > eq(k)=TL1(k+1);
> > end
> > eq1=num2cell(eq);
> > Out1 = regexp(TL1{1},'\w*','match');
> > S=solve(eq1{:},Out1{2:end});
> > Vout=S.x;
> > Vin=z;
> > H=Vout/Vin;
> > This code I am running for the file user input1.m which contains
> > 'z,x,o,p,q,r,s,t,u,v,w,T'
> > 'A*p+B*u'
> > 'y*p+D*q+E*r+F*s'
> > 'G*q+H*r+I*t'
> > 'J*q+K*s+L*x'
> > 'M*r+N*o+O*t+2*x*P'
> > 'x*Q+R*o+S1*s+P*t+U*T+V*z'
> > 'W*o+N*t+X*T+R*2*x+Y*v'
> > 'd*w+e*v+f*u'
> > 'g*u+h*p+i*w+j*v'
> > 'k*v+l*o+m*w+n*u'
> > 'Z*T+2*x*a+b*z+c*o'
> >
> > where z is the input and x is the output ;
> > This code is not working as solve function gives error ...
> > please tell me the changes to be made
>
>Oh that temp is not there ...
>there are no ? literals in input1.m..
First  |  Prev  | 
Pages: 1 2
Prev: Uitreenode icon
Next: optimization using fminunc