« first day (951 days earlier)      last day (3542 days later) » 

3:17 AM
any one around? I have basic question to verify on M
 
@Nasser I'm here
 
@mfvonh I just to verify, is list such as lis={1,2,3} mutable in Mathematica?
I assumed lists are mutable in M, just wanted to make sure.
so that when I do lis[[2]]=6 is does not create new list, right?
 
@Nasser Haha I know that is basic but I don't know the answer for sure. I have always assumed the same.
 
strange thing, it is very hard to find an answer to such most basic question on the net !
I feel terrible now that I am not sure about this, but I think 99.99% it is mutable
 
It is important to understand that ReplacePart always creates a new list. It does not modify a list that has already been assigned to a symbol the way does.
oh sorry part of the quote did not paste
Search for "It is important to understand" on that link
@Nasser
So it seems like you are correct, it does not create a new list
 
3:27 AM
@mfvonh yes, I know about replace part. but was thinking of lis[[ind]] type access. i.e. modify list in place. thanks for the reference !
 
Right the part that didn't paste is an example of that
 
@mfvonh thanks I got it. I actually visited that page before while googling, but was searching the page for the word "mutable" that is why I missed it.
 
@Nasser Me too actually. I ended up circling back to it after seeing it referenced here forums.wolfram.com/mathgroup/archive/2013/Sep/msg00134.html
(Which does not add any additional info)
Though we should thank @BobHanlon I suppose :)
 
@mfvonh the reason I am asking, is that I just found out that Maple lists are not-mutable! So not efficient to use as M lists. Actually in Maple one has to switch to using a Vector there to obtain mutable list-like. I do not like this at all., I think M is much easier having mutable basic lists.
 
@Nasser I am not well acquainted with the finer points of computational efficiency but that seems strange. If anything it seems to me like it should be the other way around. Most of what I know about immutability is from learning F#, but pretty much all the literature on it is written by fanboys and they say immutable lists are the best thing since sliced bread.
Are you proficient with Maple? I have not used it much but after exploring it a bit there seemed to be no reason to learn it coming from Mathematica.
They appear to be engaged in a marketing flame war with Wolfram and I did not find their material very persuasive
 
3:40 AM
@mfvonh I only used for maple for basic stuff. Nothing advanced. solve equation, basic plots, etc.... I find it not as well designed as M actually
 
That is my impression
 
@mfvonh Maple is very strong in differential equations actually and to some extent in integral equations. But as an over all system, it is not organized.
Maple UI is really not good also.
 
@Nasser Here is one of the first arguments the make: "In Maple, once you have entered your problem, you press the <Enter> key to tell Maple to perform the computation
and give you the result. Typing “2+2 <Enter>” results in 4.
In Mathematica, typing “2+2 <Enter>” moves the cursor to the next line, without calculating anything. To ask
Mathematica to perform the computation, you must press <Shift>+<Enter>. This non-standard interaction requires
users to adapt their normal behavior."
Seriously? That's the best they've got?
 
@mfvonh yes, I know about this document. There is a marketing battle going on between M and Maple there :)
 
@Nasser Do you happen to know, does Maple have a stronghold in any particular industries/fields?
 
3:45 AM
Maple used to be a very good system long time ago. SInce they changed the UI to use Java few years ago, its UI got much worst over the years
@mfvonh Maple main strength used to be in Math itself. but last few years they are moving to maplesim (simulation and dynamics) they have large product to compete with Matlab simulink.
@mfvonh Maple uses packages for everything. So to use a command in Maple, one has to know which package to load and which command from that package to use. Mathematica went to other way, its commands all in the system context and are there for direct call. I think it is simpler this way.
 
@Nasser As arrogant as Stephen Wolfram seems to be, and for all the marketing garbage one has to sift through, I do think the "single vision" behind the language design in Mathematica has really paid off
At least for me, I find Mathematica to be the most pleasant language (of those I know) to use
Package-based design is why I abandoned Python for Mathematica actually
 
@mfvonh yes, Mathematica is more consistent and organized. But also, there is performance issues I have with M. Many actually. I stopped doing Manipulate and simulation in M as I can't get good performance from my simulation. So I spend long time writing something and it is slow at the end. Also, as I said, Maple differential equation solving is much better than M. See here for example 12000.org/my_notes/kamek/kamke_differential_equations.htm So, even though M is better designed ....
I think if the performance is not good, then it is a problem.
I agree with you. I do not like package based system. One spends more time just to figure which package to load. I prefer M way, all commands there out of the box.
 
4:06 AM
@Nasser Certainly Mathematica is frequently slow. I don't do much intensive numerical computing with it, and in a way I think I am almost an ideal user when it comes to taking advantage of the language's unique features. A large fraction of my work is manipulating unstructured data, and no other tool even comes close to Mathematica for that
The symbolic pattern matching is simply magical :)
 
@mfvonh actually the simulation I do is not intensive numerical, it is just the GUI is slow. Rendering slows down when there are lots of 3D objects on the screen to update. This makes M not suitable for simulation of physics. But I agree with you, M is very flexible with playing around with lists and patterns and such. This is its main strong point.
 
4:19 AM
@Nasser Just curious, what do you do? Physics PhD sounds like? Student?
 
@mfvonh I am student now. Not Phd. I like to take different courses in different subjects. Now studying mechanical engineering. so I am jack of all trades, master of none ;)
 
@Nasser If I could redo my undergraduate I would do an engineering degree. I studied math, and then I was interested in sitting for the patent bar (credential to be an intellectual property attorney) but you have to have a certain number of undergraduate credits in a "technical" field except mathematics courses do not count.
It's absurd though. If I had gotten a degree in botany I could meet the requirement and then I could go work in petrochemicals, which obviously would have nothing to do with botany "technically"
 
@mfvonh you could always go back to school if you can and get engineering degree if that is what you like to do. Msc will be better. I do not like law and business and all that. I once sat in a business class and felt sleep after 10 minutes ;)
 
@Nasser I do not like law and business either, I have discovered :)
Where do you study?
 
@mfvonh Univ. Wisconsin, Madison, USA.
 
4:31 AM
@Nasser Oh quite close. I was just up there camping 2 weeks ago.
 
@Pickett I can't try it riight now but thanks, that looks exactly what I was hoping for
 
@mfvonh too hot for camping now. too humid now here. Well, thanks again for the link for the mutable lists for M, that was useful. Have to go now. Nice talking. bye
 
@Nasser Likewise. Night
 
4:47 AM
@Nasser You are right, lists are mutable in a way and that can be handy but there are also drawbacks. Leonid has written about it here.
 
 
13 hours later…
5:24 PM
Does anyone know off hand how to align equal signs for equations in EquationNumbered cells (using the Journal template)?
 
5:51 PM
anyone know what plotting function this is?
 
6:05 PM
@mfvonh ListLinePlot or Plot depending on what he's working, with the option Filling and non-default color scheme.
Or maybe he didn't select the color scheme explicitly, but selected a PlotTheme instead.
 
@Pickett Does that mean I have to accumulate the series so that they are showing as fractions?
I was hoping there was a way to do that automatically
(Fractions of 100%)
 
@mfvonh Good question, I don't recall seeing an automatic way of doing that. But instead of accumulating and calculating percentages I think you can just divide the lists of values by the value that corresponds to 100 % and change the y-axis labels.
 
@Pickett Oh yeah, that would make more sense haha. I've never tried to produce a graph like this; it's kind of surprising to me that it's not a built-in feature
 
Can anyone give informed commentary on ILP algorithms implemented in Mathematica, and LinearProgramming? I'm trying out some 0-1 ILP problems with lots of largeish at-most-one-nonzero groups. My feeling is that throwing Mma any serious problem I'm considering is going to make me wait until end of the universe and beyond. Is it that maybe Mma is not best at this, or am I hit by real NP-completeness?
Approximative results would be nice, but sadly Unique Games Conjecture has some feeling of finality on how good approximative constraint satisfaction problem algorithms can even exist...
 
 
3 hours later…
9:22 PM
If the number of data points is high enough, `BarChart` with the option `ChartLayout -> "Percentile"` can produce this kind of plots. E.g.: `BarChart[Table[{1 + Sin[x/10]^2, Log[x] Cos[x/7]^2, Sqrt[x], Log[x],
2 + Sin[x/23], 2 - Cos[x/50]}, {x, 1, 50, 0.1}],
ChartLayout -> "Percentile", Joined -> Automatic, BarSpacing -> None,
ChartStyle -> 3]`
 
@Karsten7. Thank you!!!
 
@Karsten7. Cool :)
 
9:40 PM
BarChart[data, ChartLayout -> "Percentile", Joined -> Automatic,
BarSpacing -> None, ChartStyle -> 3, Frame -> True, Ticks -> None,
PlotRangePadding -> None, PlotRange -> {{0, Length@data}, Automatic}]

will look much better, but one will have to fix the values for the x axes ticks:
 
@Karsten7. This is exactly what I needed. Bizarre that it's not in the ChartLayout section of BarChart, though there is an example in "Neat Examples" but it's kind of weird and really underrepresents the usefulness of this feature
(BarChart docs, that is)
 
10:19 PM
@mfvonh BTW, how is the code highlighting done in the chat?
 
surround code with `
@Karsten7.
The same works in posts
If the MMA code includes a ` (e.g., due to a context) then surround with ``
 
@mfvonh Thanks, somehow it didn't work for BarChart and the code above.
 
BarChart[data, ChartLayout -> "Percentile", Joined -> Automatic,
BarSpacing -> None, ChartStyle -> 3, Frame -> True, Ticks -> None,
PlotRangePadding -> None, PlotRange -> {{0, Length@data}, Automatic}]
test
nope didn't work
Strange, I thought it was possible to prefix with 4 spaces in chat as well
 
hi
 
hey
 
10:31 PM
I want if I can see the steps of calculation in Mathematica. For example when I want to solve an equation Mathematica directly gives you final result, I want if I can see the steps of getting the final result.
Thanks
 
@barznjy Have you looked at Trace or TracePrint? Or do you mean the steps inside a single routine?
 
I think Trace command is not telling you the steps
 
@barznjy OK yes Trace won't do step-by-step for mathematical calculations. In general Mathematica will not be able to give you that information
But you can use the WolframAlpha command
 
@mfvonh could you tell me how?
 
For example WolframAlpha["a x^2 + bx + c == 0"]
In the "Solutions" pod, you will see a button "Step-by-step solution"
@barznjy
 
10:39 PM
@mfvonh very nice, thanks. do you think this can be used for integral ?
 
@barznjy Yes, but I am uncertain what classes of integrals it will be able to provide a step-by-step solution for
e.g. WolframAlpha@"integrate sin(x)+3x^2/5"
 
@mfvonh how to write the same formula for definite integral?
 
@barznjy WolframAlpha@"integrate sin(x)+3x^2/5 from -pi to pi/4"
 
@mfvonh Many Thanks
 
@barznjy My pleasure
 

« first day (951 days earlier)      last day (3542 days later) »