Reputation
34,863
Next tag badge:
95/100 score
27/20 answers
Badges
1 53 123
Impact
~435k people reached

Jan
9
comment series to rational order
same with Maple: series(x^(1/4)+x^(1/3)+x^(1/2), x=0,1/3 ); gives Error, invalid input: series expects its 3rd argument, n, to be of type {infinity, nonnegint}, but received 1/3
Jan
9
comment Why doesn't replace and evaluate?
see replace-rule-with-function-derivatives-dont-evaluate and replace-function-and-its-derivatives-found-with-solve
Jan
9
comment How can I obtain the same result without using any loop?
You might want to do f[n_] := f[n] = n + f[n - 1]^2;
Jan
8
comment Plot Command With Clean Grid Lines
@AxelF exactly. After making that "fix" in the question there, my Mathematica got inflicted with the dreaded Formatting Notebook Contents problem each time I open any new notebook or do anything. So I removed the graphic card update and went back to the yellow Mathematica, but now without having to suffer with Formatting Notebook Contents. 10.3.1 on windows 7, 64 bit.
Jan
7
comment how to import plain text file, with mixed formats with strings that contain commas
@m_goldberg OMG! You are right. I used the wrong 3 letters. When I changed the file name to test.csv from test.cvs then it worked :) Sorry about the confusion. You method also works. I have a pharmacy called CVS next to where I live, may be that is why I made this mistake.
Jan
7
comment how to import plain text file, with mixed formats with strings that contain commas
@m_goldberg if I just use Import["test.csv"] I do not get an error, but the data read is one long string. Which is not what I want. If I use Import["test.csv","CVS"] I get an error. I do not know why you did not get one long string on your end. Here is screen shot: !Mathematica graphics
Jan
7
comment how to import plain text file, with mixed formats with strings that contain commas
great! this option did it. I am surprised no one mentioned this option in all the questions I looked at.
Jan
7
comment how to import plain text file, with mixed formats with strings that contain commas
@m_goldberg as I mentioned in the post, I get an error when using CVS. I also renamed the file as cvs and tried it. I mentioned this in the question, I am on windows 7, 10.3.1. Please see 3) above. It could be a different OS thing issue.
Jan
6
comment How to set the relative directory so that they work both in script and in notebook and portable?
again, you do not need to SetDirectory["../data"]; to export to it. Just add the path to the file name. See first if the linked answer works for you.
Jan
6
comment How to set the relative directory so that they work both in script and in notebook and portable?
When the notebook or script is run, there is a default current directory that is set, which is different from the actual directory where the script or the notebook is located. On windows 7 it says C:\Users\<user_name>\Documents. So you have to correct this to the actual current directory where the notebook or the script is first. Then from there, you can go one level above to the data directory. I do not know where your script is located. May where it is located there happened to already data directory above it so it worked.
Jan
6
comment How to set the relative directory so that they work both in script and in notebook and portable?
i.e if can determine that the script directory is c:\my_folder\my_code then the data directory will be c:\my_folder\data. Right?
Jan
6
comment How to set the relative directory so that they work both in script and in notebook and portable?
I just need to export the data to the folder data which is one level up to the current code directory I must be missing something. If you can find out the current code directory (which is what the answer linked to shows), then you know the folder above it. So I do not know what is the issue. You also do not have to set directory to save to it. You can just construct the file path.
Jan
6
comment How to set the relative directory so that they work both in script and in notebook and portable?
This was asked before. analogue-of-notebookdirectory-for-scripts-to-get-the-directory-path-of-my-scr so once you know current directory of script, you can now do the rest.
Jan
4
comment Some time difficulty in a Manipulate program inside a DynamicModule
I was mostly concerned about what would be the simplest way for students to handle this problem who are brand new to Mathematica. I think you should stick to Manipulate only. This is much simpler for students who are new to Mathematica, rather than start with DynamicModule. Manipulate simplifies many things and it is a simple framework to start with. I've had a course in physics, where many students never used M before, and many struggled just with basic plotting and such. I can't imagine having to start with DynamicModule and Manipulate inside it on top of that.
Jan
4
comment How to automatically have ContourLabels in middle of Contour lines if specific levels are not specified?
Ok, I tried for the last 40 minutes, but too many problems to resolve. This package was done using old graphics and uses too many old options and such, and it will need much longer time to fix. But I think it will be worth it. I am really surprised that WRI did not integrate some of the functions in this package in Mathematica. This package has been around for only 20 years! I guess WRI is busy with cloud computing now and has no time to work on such basic things like contour labels location :)
Jan
4
comment How to automatically have ContourLabels in middle of Contour lines if specific levels are not specified?
Thanks for the link. I downloaded and installed it. But as expected, it does not work with 10.3.1. This is an old package from version 3.0 ! I get lots of errors: !Mathematica graphics but what I will do next, is locate this specific function in the package, and try to make it work for 10.3.1. I've always had problems running old packages in new Mathematica versions. Something always changes. The LabelContour function is very complicated 450 lines long !
Jan
3
comment Change function acting on sum to function acting on each object individually
@Kuba yes, I forgot above the -1, thanks for point it out. But Expand@expr is still needed as well.
Jan
2
comment Why do I get different results for the same input specified using natural language phrasing?
This site is about the Wolfram Mathematica language, not the Wolfram Alpha language. These are not really the same languages, even though they are based on the Wolfram framework. You might be better asking about the Wolfram Alpha language at the Wolfram community website, where there are many Wolfram Alpha language questions posted.
Jan
2
comment make constant some elements of a list
but there should be simple way, the simple way is to use an if statement. This is what one does in any programming language really. I do not see why it would be different in Mathematica. Trying to play tricks like what you wanted to do is the wrong approach to solve the problem. To get better help, please post a minimal example of the actual problem you are working on.
Dec
27
comment Dynamic plot with synchronization of real time
@LeoRon7 the standard method for allocating a buffer when one does not know how much to preallocate, is to allocate it using fixed sizes. (one chunk at a time). Start with say size = n, where is n is some number you decide on. Use Table to allocate it. Then use [[ ]] to write to it. When it fills up, you can allocate another list of size n. And so on. If you need all those chunks in memory, you make a linked list of them. And so on. Here is an example of linked list mathprogramming-intro.org/book/node525.html