From: natasha on 21 Jul 2010 05:39 Hi I am using solve function to solve equations like S=solve(eq(1),eq(2),eq(3).......eq(i),TL(1),TL(2)......TL(i+2)) where eq= [ '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', '2*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'] and TL1=<1*25sym> and eq= <1*11sym> i.e both are sym tell me a way to use the solve function as variable 'i'contains the equations to be solved
From: Abhishek on 21 Jul 2010 06:38 "natasha " <aggarwalabhi.14(a)gmail.com> wrote in message <i26f7o$3im$1(a)fred.mathworks.com>... > Hi > > I am using solve function to solve equations like > S=solve(eq(1),eq(2),eq(3).......eq(i),TL(1),TL(2)......TL(i+2)) > where eq= > [ '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', '2*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'] > > and TL1=<1*25sym> > and eq= > <1*11sym> > i.e both are sym > tell me a way to use the solve function as variable 'i'contains the equations to be solved >it cant be solved like this....(may be any other way)
From: Steven_Lord on 21 Jul 2010 09:51 "Abhishek " <abhi14jan(a)yahoo.com> wrote in message news:i26imc$96g$1(a)fred.mathworks.com... > "natasha " <aggarwalabhi.14(a)gmail.com> wrote in message > <i26f7o$3im$1(a)fred.mathworks.com>... >> Hi >> I am using solve function to solve equations like >> S=solve(eq(1),eq(2),eq(3).......eq(i),TL(1),TL(2)......TL(i+2)) >> where eq= >> [ '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', '2*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'] >> and TL1=<1*25sym> >> and eq= >> <1*11sym> >> i.e both are sym tell me a way to use the solve function as variable >> 'i'contains the equations to be solved >>it cant be solved like this....(may be any other way) Abhishek, You've created at the very least half a dozen threads over the past couple of days for the EXACT SAME QUESTION. That tends to annoy people. Can you do me a favor? Take your fingers off your keyboard and your mouse. Put your hands behind your back. Yes, I mean it. Now, take a deep breath. Hold it for a few seconds, then let it out. Deep breath, hold it, let it out. Deep breath, hold it, let it out. Now. Post your FULL code to ONE AND ONLY ONE thread. Indicate in that thread what your goal is (explain it as though the people to whom you're explaining it have no idea what you're doing) and explain what's actually happening (with the full text of error messages, etc. as appropriate.) Stick to that ONE AND ONLY ONE thread to discuss your problem. That way, anyone who wants to help you only has to go to ONE location to do so. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: Walter Roberson on 21 Jul 2010 12:04 natasha wrote: > I am using solve function to solve equations like > S=solve(eq(1),eq(2),eq(3).......eq(i),TL(1),TL(2)......TL(i+2)) > where eq= > [ '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', > '2*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'] > > and TL1=<1*25sym> > and eq= > <1*11sym> > i.e both are sym tell me a way to use the solve function as variable > 'i'contains the equations to be solved Teq = num2cell(eq); TTL1 = num2cell(TL1); S = solve(Teq{:},TTL1{:});
From: Abhishek on 21 Jul 2010 12:20 Walter Roberson <roberson(a)hushmail.com> wrote in message <dUE1o.20913$Hw.19201(a)newsfe10.iad>... > natasha wrote: > > > I am using solve function to solve equations like > > S=solve(eq(1),eq(2),eq(3).......eq(i),TL(1),TL(2)......TL(i+2)) > > where eq= > > [ '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', > > '2*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'] > > > > and TL1=<1*25sym> > > and eq= > > <1*11sym> > > i.e both are sym tell me a way to use the solve function as variable > > 'i'contains the equations to be solved >thanks a lot >that works .. >one more help ...after solving i do >S.TTL1{3} which returns an error given below ??? Reference to non-existent field 'TTL1'. >i am using S.TTL1{3} because TTTL1 is in the file from which i am reading.. so i dont know the exact values of the variables.....but i know that my output variable is at 3rd position... > > Teq = num2cell(eq); > TTL1 = num2cell(TL1); > S = solve(Teq{:},TTL1{:});
|
Next
|
Last
Pages: 1 2 Prev: pixel counting in HSV image Next: assigning the variable value to the variable name |