Nsolve and many other functions return “Rules” of the form{ {q1->number},…}. You apply the rules with /. or Apply.
{q1, q2, q3, q4, lamda} /. ans
Makes a matrix of the results in the order q1,q2,q3,q4,lamda. You can export the matrix in whatever format you want – Read the documentation for Export.
I got this time a text file contains all results. But for me, I want just the numeric data (just the numbers) without the letters {q1,q2,q3,q4,lamda } and Symbols “->”,ie, just the valus of q and lamda.
I wrote “If ans is the result you got from NSolve,”
ans is not a magic keyword. I assumed you would set
ans = NSolve[...]
And then use it as I described. You really need to take ownership of your problem and learn the Wolfram language. The community can point you in the right direction but you should read the documentation and try to understand what commands we use and not consider them “black boxes”.