0
|
6744 Views
|
10 Replies
|
1 Total Likes
View groups...
Share

# How to plot graphics from a series

Posted 10 years ago
 Dear friends, 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 ? Scabral Attachments:
10 Replies
Sort By:
Posted 10 years ago
 Wooow ! Perfect, Marco ! Thank you immensely ! It got perfect ! Scabral
Posted 10 years ago
 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}]]Cheers,M.
Posted 10 years ago
 No, i haven't.
Posted 10 years ago
 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...
Posted 10 years ago
 This y=Range[...] things looks like you have worked with Matlab before (where it is usual to handle such situations like this) am I right?
Posted 10 years ago
 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 ? Attachments:
Posted 10 years ago
 Perfect. Great ! Every day I get more and more inspired with Wolfram. All the best !
Posted 10 years ago
 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. Cheers,Marco
Posted 10 years ago
 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 !
Posted 10 years ago
 Hi,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: y = Range[0, 0.25, 0.01] `Without it, you get a plot:The notebook is attached. Cheers,Marco Attachments: