Prev: polyval help: finding the root
Next: urgent
From: Abhishek on 22 Jul 2010 09:48 i have a file containing some text space some equations like A=k*u+y*t; B=p*t+t*q; etc please tell me best way to read equations not the text above it and pass the left side of assigments in one array and their values in other array .... please help >sorry (steven lord,us.....etc) >now i have read the documentation.....
From: us on 22 Jul 2010 09:55 "Abhishek " <abhi14jan(a)yahoo.com> wrote in message <i29i6k$1ma$1(a)fred.mathworks.com>... > i have a file containing > some text > space > some equations like > A=k*u+y*t; > B=p*t+t*q; > etc > please tell me best way to read equations not the text above it and pass the left side of assigments in one array and their values in other array .... > please help > >sorry (steven lord,us.....etc) > >now i have read the documentation..... a hint: help textread; us
From: Steven_Lord on 22 Jul 2010 11:18 "Abhishek " <abhi14jan(a)yahoo.com> wrote in message news:i29i6k$1ma$1(a)fred.mathworks.com... > i have a file containing > some text > space > some equations like > A=k*u+y*t; > B=p*t+t*q; > etc > please tell me best way to read equations not the text above it and pass > the left side of assigments in one array and their values in other array > .... > please help >>sorry (steven lord,us.....etc) >>now i have read the documentation..... Is this still related to that SOLVE issue that yesterday I suggested you keep in one thread? The easiest way to do what I think you want is to open the file in the Editor, comment out the text above the equations, add a line like: function [A, B] = myfunction(k, u, y, t, p, q) % etc and then resave it as myfunction.m. Then you can invoke the function just like any other function in MATLAB. If that's not an option, open up the documentation and search for some word or phrase that describes what you want to do. For instance, what do you find if you search for "read text file"? Do any of the pages that come up suggest any interesting functions that you could use to solve this problem? -- 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
|
Pages: 1 Prev: polyval help: finding the root Next: urgent |