@OleksandrR. The snake was highly poisonous, and a significant rewrite is required. I think I will sign off for a while from here, and burn my perfect record. Thanks for the well wishes.
Please.. someone remind me that posting stub answers is OK, before I test and finalize my solution next time and someone jumps in with a one-line, nothing explaining answer.
@acl Nope, I don't mean that. Here, Nasser was really first and had I known, that he writes a similar answer, I would not have started my one. But his first approach (the one he deleted at first) was kind of hacky and I thought he doesn't writes another.
I mean the first version of Vitaliys answers here.
The OP is obviously a novice and to place an answer without explaining anything from someone who is really experienced is no good example.
@acl I'm generally OK with but I think the older members (1) don't need the reputation that much, (2) should try to give others the chance to gain rep and (3) should write good answers which differ from fast, drive-by solutions.
@acl Yes, I kind of screwed it this night. I fell asleep on the couch around 10pm and woke up at 2pm. Now I'm too awake to go to bed so I will try to make it until lunch and take then some minutes sleep ;-)
one nice thing in Mathematica is that symbolics and numerics are integrated into it very nicely. I just saw someone at Matlab group calling fsolve() on symbolic expression and they were wondering what is wrong :) (fsolve() is Matlab numeric equation solver)
@NasserM.Abbasi They probably just had to call solve(), right? Similar situation as calling NSolve on a symbolic equation and wondering what's wrong :)
@rm-rf no much worst. They used .* notation as if x was a vector, and declared x as syms, and then called fsolve. Very confusing. I see this all the time in Matlab groups. They mix syms with numerics with no idea what they are doing
A short question on MMA upgrades: On windows, should you deinstall MM8 before/after you install MMA9. This is the first time I upgrade and when I started the installation of MMA 9, there was no indication of that the installation script deinstalls the earlier version.
Disregard my question about the upgrade..it seems like MMA9 replaced MMA8
@FredrikD, no, I did not have to un-install V8. It does ask during the installation if you want to remove earlier versions, I always say no as I'd like to keep them to compare things sometimes.
@NasserM.Abbasi ok, I never got the question from the installation script. And yes, I can see that v8 still is installed. Have you had any problems with having both versions active?
@FredrikD on Windows the installer asks you at some point if previous versions should be uninstalled - but this is just optional. For some time I had versions 6, 7 and 8 installed and that worked nicely.
@YvesKlett my documentation center reveals some problems that make M9 crash (from time to time), and I have some hiccups on first accesses to Wolfram|Alpha (I'm on win XP). WRI is looking into it.
I think the crashes aren't exclusively related to the documentation center, it is simply a place easier to reveal them...
Now I'm screwed. Something broke the WolframLibrary. Either Wolfram themselves or the new Intel compiler 2013. I put simple tensor in `ConstantArray[0, {512, 512, 3}] // Dimensions` and in my library the same tensor has dimensions {64,0,64} although I do nothing except of
MTensor m_image = MArgument_getMTensor(args[4]); const mint *m_dims = lib->MTensor_getDimensions(m_image);
I'm afraid to ask: Someone doing similar things? @OleksandrR.?
@OleksandrR. I'm in a no-man's land at the moment. My committee decided not to require me to present again, although it was considered. Instead, I have to meet some rather tight deadlines for both them and the graduate school. So, a lot of typing left to do.
@P.Fonseca I have not had problems with the documentaion center. I am on windows 7, 64 bit. But I noticed V9 when it comes up, it takes longer than V8 and the splash screen says "... not responding..." for just 2-3 seconds. Please see screen shot
I reported it to WRI support. I never seen this in V8. It is no big deal really, I assume becuase V9 is much bigger product this happens
@halirutan Let me try this when I get back to my office. I certainly hope it still works or I'm screwed too!
@rcollyer Well at least it's a question of typing things, and anyway you knew the thesis was not the best possible. Much much better than having another defense!
Hi, did anybody else have problems after switching from V9 Trial to full version? I still have no Export capabilities, so it seems the Trial restrictions remain in place.
@MarkusRoellig try to start Mathematica while pressing on the CTRL-SHIFT key at the same time, until you see the splash window come up, then release. see if this changes things.
@MarkusRoellig did you try turning it on and off again? Only partially kidding - after I put in the new activation key via "Help"->"Enter Activation Key" the new license showed only after a restart (or reboot, I do not remember). Mind you, I had the Tech Conference beta installed before that.
@halirutan unfortunately not. This is something I had been meaning to look at for a long time but with the thesis I haven't had any time. Send me your code and I'll try it with gcc if you want (but I suppose you already have gcc so that may not be useful).
@rcollyer okay... so, you passed with major corrections needed? Maybe you're not feeling too happy about the revisions right now but since you appear to have defeated the snake after all I think congratulations are still in order. :) Do the corrections have to be vetted by the committee? I read up on this last night and was surprised to learn that the committee often has seen drafts of the thesis during the whole process so it seems they have much more involvement than in the UK system...
@rcollyer Congrats, and good luck with the deadline!
@NasserM.Abbasi Did you notice they neglected to update the included example systems? Comparison with those is useless now in v9 because those benchmarks very all run in 8.
Question: I am looking for a *nice* way to fill a symmetric matrix from a list (which has the correct size: n(n-1)/2 if the matrix is n by n). Does anyone have an elegant solution?
@OleksandrR. @acl I have to look deeper into this. What I can tell you is, that (I already reported this long time ago) there is now an IMO inconsistency when using WolframLibrary and MathLink at the same time. I would like to have an opinion about that:
In WolframLibrary.h we have now the following:
#ifdef MINT_32
#ifdef _WIN32
typedef __w64 int mint;
#else
typedef int mint;
#endif
#else
#ifdef _WIN64
typedef long long mint;
#else
typedef long mint;
#endif
#endif
This means that on my machine (without defining MINT_32) the type of mint is long
Now, MathLink's functions dont work any more because e.g. MLPutIntegerList uses a list of normal intand not long.
error: argument of type "mint={long} *" is incompatible with parameter of type "int *"
return MLPutIntegerList(mlp,list,length);
This means in the WolframLibrary the type mint (which kind of stands for Mathematica-integer) does not match all Integers in MathLink.
@halirutan hm. Oh dear. I'm not sure I have much of an opinion to give since I don't use this enough to keep track of how WolframLibrary.h evolves. Is it possible to load an M8 Wolfram Library into M9, given the 32/64-bit transition?
@OleksandrR. Passed by 3 out of 5 members. Two are withholding their votes while I make my corrections which then have to be vetted. So, passed sort of, but can't use the initials, yet. The presentation went well, usual complaints from the peanut gallery (my figures are great in print, suck on projector).
@OleksandrR. I have no idea. The first thing I tried to reproduce my bug is to use the arbitraryTensor.c example of WL but that works. I will now create a test-function which takes more arguments, because my loaded M-functions usually look like this here as example:
@BrettChampion Hard deadline for my committee: first week in January. For the graduate school: 3rd week (I think). My personal goal: 2 weeks. More realistic: 1st of the year. However, if I can pull off 2 weeks, I'll be a much happier camper. Can't wait for 40 hour work weeks, and sleep, and time with my wife and son, and maybe the rest of the family, too.
@YvesKlett Had one, or two, last night. On an empty stomach it amounted to me getting a bit more drunk than I normally like to. But, hey, no hangover.
I'm just trying to solve the Schrodinger equation for hydrogen. We went through the solution by hand in class but Mathematica doesn't do anything when I try to solve it (it just re-displays what I typed in):
DSolve[-h^2/(2*mu)*(1/r^2*D[r^2*D[y[r,theta,phi],r],r] +
1/(r^2*Sin[theta])*D[Sin[...
This person seems to think that mathematica will see this equation and say "Aha! This is the Schrodinger equation with a centrally symmetric potential. Let me therefore expand it in spherical harmonics and, since it's a wavefunction, require the radial part to be finite at $r=0$ and $r\\rightarrow\infty$, even though I'm not told to.
Then, I notice that the radial part only does the right thing for the generalized Laguerre polynomials and if their order is of this form, that depends on the quantum number $\ell$ from the angular part, so that's it!"
seriously now
and someone thought this was a good question and upvoted? I mean seriously?
I mean I had two choices: (1) rewrite a good portion of my code (2) put in one simple define. I chose of course the latter. It compiles fine and strangles you from behind..
@acl @Szabolcs @OleksandrR. I think I found the part. MINT_32 shouldn't be set by anyone as it seems. In AddOns/Applications/CCompilerDriver/CCompilerDriverBase.m one finds one of only a few occurrences of MINT_32 in all *.(c|h|nb|m) files. The important part goes:
@halirutan ah, okay, good that you found it. Not really certain why they even consider the case of ILP64... Linux/Mac are LP64 and Windows is LLP64. Linux for Itanium and some other old unsupported platforms were ILP64.
@halirutan ugh. Okay. Yeah, that's a problem I agree. Sounds like we need an MLINTERFACE version 4 to sort this mess out.
I really have no practical experience with MathLink/Wolfram Library programming; it's something I've been meaning to look at but I didn't get a chance to do it yet.
Well, I just have the compilers installed to compile other codes I may come across. I have hacked on a bit of C before but I don't know C++ at all.
Another M9 gotcha: all the ColorFunction gradients got re-ordered, so if you use ColorData[i, ...] the result will be different!
Anyway... apart from the MLPutInteger issue, it seems to me that it's okay (or even preferable) to define MINT_32 yourself unless you're working on an ILP64 platform (which you're not, obviously, because nobody is).
I found a bug in the predictive interface... somewhere BitLength was intended, BitLenght was used instead!
@OleksandrR. apparently he's not alone, I located a few instances of this in some code I am using (apparently not my own, so I need to ask my collaborator)
Come to think of it now I perhaps understand why @ruebenko received back a completely garbage explanation of why MinGW-w64 can't be supported when he kindly enquired on my behalf...
@OleksandrR. Not a bug. ColorFunction causes the plot to use the 3D rendering system, and so it uses the same antialiasing (if available) as specified in Preferences > Appearance >Graphics.
@BrettChampion Can you explain this in more detail? We have [here](http://mathematica.stackexchange.com/q/14059/187) a question about this where it is shown, that this happens in a 2D graphics too and Arnoud suggested the same as you. But does that mean, that a *colorfunctioned* 2d `Graphics` is drawn by OpenGL?
@halirutan hang on the other question I was thinking of was posted a few weeks ago (it may have been updated a couple of days ago) and was something about the option being undocumented. In any case I'd be interested if you can stick a background image in a cell.
Hi, I came across a dangerous scenario: test[a_?NumericQ, b_] := {0, 0} FindRoot[test[cc, 1][[1]] + cc == 1, {cc, 0, -1, 2}] Returns {cc->0.5} How to force FindRoot to first substitute cc, before processing the equation? Is this a front page question?
@halirutan awesome question, but I wanted a few more details before I voted. I got them, then forgot to vote. So, I downvote to cancel out your upvote, right? :)
@P.Fonseca I'm not sure whether it's a front-page question because the evaluation order is pretty clear. Anyone who has already stumbled over non-numeric evaluation of e.g. NIntegrate in calls to NMinimize or whatever, should at least have a slight feeling that bad things can happen there.
@NasserM.Abbasi But one way to avoid that FindRoot goes the symbolic way is exactly to force only Numeric values (my case is much much more complicated)
@NasserM.Abbasi Yes, that one is good too but they differ completely in purpose. Maeders book is more showing you how to program while Wagners book explains the details of Mathematica.
The section in Wagners book about the main evaluation loop is so awesome.. things like this would never be asked again if everyone read it ;-)
@halirutan I gave up trying to understand details of Mathematica internals. too complex. I just try to learn better how to use it. I programmed in many languages before, and became good at them after 2-3 weeks only. With Mathematica it is different
lisp, yes. ML and Haskell no. I am old fashioned: Fortran, PLI, Pascal, Ada, C, C++, Java, Matlab, Mathematica, VAX/VMS Assembler, COBOL, bit of lisp, SNOBOL. none of the very new stuff, too complex for me :)
And believe me, I hated Mathematica at the beginning too. I came from a bit Maple and was forced to use it during my diploma. Jens-Peer Kuska was my mentor, so the reasons for using Mathematica were, let's call it overwhelming.
dsolve() in Maple is really really good (and very fast, faster than Mathematica's DSolve actually it seems). I do not know who wrote dsolve for Maple, but it is good.
But Mathematica DSolve does more diagonstics than Maples. It checks for more things. May be that is why it is a little slower
@NasserM.Abbasi I used Maple frequently in 09/10. The user interface is ugly but easy to use. 2D plotting is so much easier than in Mma and this latest units in v9 is embarrassing compared to what Maple (and MathCAD) have.
@MikeHoneychurch when I use Maple, I use the worksheet interface, I can't stand the other one (the 2D interface). I like the original interface more. But overall, I think the UI in Maple is not good. (they use Java in implementation)
But most Maple experts, I was told, just write Maple scripts, using text editor.
@MikeHoneychurch yes, I am just talking about the look of the UI. As I said, I like the Maple language itself. But now that I got used little more to functional programming, hard for me to do loops :), but Maple actually does have number of functional constructs. It has Map and such.
@NasserM.Abbasi I am not willing to program in Maple. Too used to functional stuff in Mma. But when you plot in Maple I used to find myself asking why it can't be this easy in Mma.