I´m in trouble with a problem that seems to be simple to solve. But I have wasted too much time, without success.
I evaluate two series with 1000 terms, for the sinus and cossinus components of the modulus as function of y that varies from 0 to 0.25.
No problem in doing this, but in plotting…
I could not have a graphic with modulus as function of y. One of the best I could have is show in the attached .nb file.
Would you help me, please ?
I am not quite sure what you want to achieve, but the thing is that your “function” Modulus does not seem to be a function on y anymore. That is because you have the line:
Hmmmm…What a nice help, Marco. The function is defined with basis on y and limits for y is defined only when plotting !
Thank you so much ! It does work.
A suppose the command ClearAll[“Global`*”] is a kind of refresh for all the undefined parameters (?).
All the best !
No problem. ClearAll clears all symbols in a given context; see here under Generalisations and Extensions. It’s quite a useful command.
With the Range command you defined y to be a list of numbers. When you then used y in the function it did not use that as an independent variable anymore.
Marco !
Please, how do I export data of this graphic to a .txt or .xls file ?
I want to compare results from Wolfram and excel. The nb. file is attached and the command export does notwork. Would you, please?
Thank you ?
Yes! Exactly this! I could recognize this command in the Help and then I took it. Matlab I left behind because it could not solve some tricking Laplace transforms that Wolfram did at once. In fact, I started with Fortran in the late of the 80´s…Pascal, Basic, C and then I moved to Excel for a long time. But it became unsatisfactory for deeper investigations and then here I am…
Sure. The problem seems to be that instead of exporting values to the file you actually try to export the function.
In order to create a list (a table) of values you could use this export command:
Export["~/Desktop/teste.txt", Table[Modulo /. y -> i // N, {i, 0, 0.25, 0.025}]]
The idea is that it takes the Modulo expression and substitutes the y by values in the range from 0 to 0.25 in steps of 0.025. The N helps to obtain numerical values.
I hope that this helps. If you want also the “x-coordinate” you can use:
Export[“~/Desktop/teste.txt”, Table[{i,Modulo /. y → i // N}, {i, 0, 0.25, 0.025}]]