Thread Subject: remove

Subject: remove

From: Abhishek

Date: 30 Jul, 2010 08:18:05

Message: 1 of 4

Hi
I am reading the file 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'
using the code
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 TL1
fid=fopen('/sim/TLV1117LV_DS/x0138322/scripts/userinput.m');
i=-1;
while(1)
     tline1 =fgetl(fid);
        if isempty(tline1), break, end
         TL1 = [TL1 sym(tline1)];
   i=i+1;
 end
fclose(fid);
which give me TL1 as<1*24sym> containing
TL1 =
 
[ TL1, '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']
 but I dont want ( ' ) before z and afterT because they create error in rest of the code
Please tell me a solution to this;;;;;;

Subject: remove

From: Oleg Komarov

Date: 30 Jul, 2010 08:26:05

Message: 2 of 4

"Abhishek " <abhi14jan@yahoo.com> wrote in message <i2u1rt$rlc$1@fred.mathworks.com>...
> Hi
> I am reading the file 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'
> using the code
> 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 TL1
> fid=fopen('/sim/TLV1117LV_DS/x0138322/scripts/userinput.m');
> i=-1;
> while(1)
> tline1 =fgetl(fid);
> if isempty(tline1), break, end
> TL1 = [TL1 sym(tline1)];
...
> but I dont want ( ' ) before z and afterT because they create error in rest of the code
> Please tell me a solution to this;;;;;;

Substitute sym(tline1) with sym(tline1(tline1~=char(39)))

Oleg

Subject: remove

From: Abhishek

Date: 30 Jul, 2010 08:54:09

Message: 3 of 4

"Oleg Komarov" <oleg.komarovRemove.this@hotmail.it> wrote in message <i2u2at$r31$1@fred.mathworks.com>...
> "Abhishek " <abhi14jan@yahoo.com> wrote in message <i2u1rt$rlc$1@fred.mathworks.com>...
> > Hi
> > I am reading the file 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'
> > using the code
> > 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 TL1
> > fid=fopen('/sim/TLV1117LV_DS/x0138322/scripts/userinput.m');
> > i=-1;
> > while(1)
> > tline1 =fgetl(fid);
> > if isempty(tline1), break, end
> > TL1 = [TL1 sym(tline1)];
> ...
> > but I dont want ( ' ) before z and afterT because they create error in rest of the code
> > Please tell me a solution to this;;;;;;
>
> Substitute sym(tline1) with sym(tline1(tline1~=char(39)))
>
> O.k i have substituted and it has worked ...
One more help ;;
I am using after this the following code
for k=1:i
  eq(k)=TL1(k+i+2);
end
eq1=num2cell(eq);
TTL1=num2cell(TL1);
S=solve(eq1{:},TTL1{3:i+2});
Vout=S.x;
Vin=z;
H=Vout/Vin;
which works but i want to use
Vout=S.TTL1{3};
Vin=S.TTL1{2};
H=Vout/Vin;
as it is a part of automation....But it gives error as
 >S.TTL1{3}
??? Reference to non-existent field 'TTL1'.
Please tell me the solution....

Subject: remove

From: Walter Roberson

Date: 30 Jul, 2010 23:18:50

Message: 4 of 4

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 TL1 >

> for k=1:i
> eq(k)=TL1(k+i+2);
> end
> eq1=num2cell(eq);
> TTL1=num2cell(TL1);
> S=solve(eq1{:},TTL1{3:i+2});
> Vout=S.x;
> Vin=z;
> H=Vout/Vin;
> which works but i want to use Vout=S.TTL1{3};
> Vin=S.TTL1{2};
> H=Vout/Vin;
> as it is a part of automation....But it gives error as
> >S.TTL1{3}
> ??? Reference to non-existent field 'TTL1'.

S.(TTL1{3})

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
oleg Abhishek 30 Jul, 2010 04:59:27
help stuck Abhishek 30 Jul, 2010 04:19:07
rssFeed for this Thread

Contact us at files@mathworks.com