I'm trying to make program that will do matrix manipulation: adding, subtracting multiplication etc.
I would like my program to be similar MATLAB ;user would enter new matrix in
some similar way:
example for row vector A=[1,2,3]
I think that I need to treat this as a string and then go character by charcter to test with isdigit() etc. It would possibly lead to solution but it is rather complicated. Is there another way (conceptualy)?
And in general case for example program locus32 graph editor you enter (sinx)*exp(-x) and program plots a graph.
How this is done? I mean (sinx)*exp(-x). Is it by parsing string or how else? I need a few advices on this issue.
I can solve problem by forcing user to enter number of rows and columns and entering elements through menu, but I'm very interested how this is made in real world.
Thank you very much!



LinkBack URL
About LinkBacks


