mcandril
Reputation
338
Top tag
Next privilege 500 Rep.
Access review queues
 Mar6 comment How do I get a plot with a certain size? @Oleksandr R. Sorry, this was just an example. I updated the question with your suggestion. AspectRatio-Full works, but the PDF does not come out with the expected dimensions. Mar6 comment How do I get a plot with a certain size? @Yves Klett I believe the sentence "I don't want to scale [it] in Scribus, as this would change the font size." was present in my first version. I don't really understand why the font size is important for the title. I want a PDF with certain dimension, I don't see why it is important what for. Mar5 comment How do I get a plot with a certain size? I don't think this is a duplicate. In the Real Size Image Printing, the images defines its size. In my case, the box in which the Plot should fit in is defined from outside. ImagePadding->0 cuts off the labels, and ImageSize does not scale my image. I added an example. Sep21 comment (N)Solve does not solve equation Unfortunately, this just gives me one solution. In this case, for example, it is the wrong one, as my beam is going in +t direction. The solving is done in a module, where the beam path is calculated recursively. With Solve, I could add "&& t > 0", with FindRoot, this doesn't seem to work. I do not understand why at least NSolve cannot solve the equation. Jul12 comment Importing array with complex numbers It is basically just adding up A LOT of complex numbers, for unaproximated Frenel-Huygens principle. I am not sure how much optimisation potential there is and how to pose the question so its relevant. Jul11 comment Importing array with complex numbers As I would like to maintain control (calculation may take8h on 8cores), I will not use the automation here, but nevertheless nice idea. Thanks. (Also to Simon.) Jun15 comment Solution for equation system with piece-wise defined functions It does not consider the else case of Piecewise, does it? Then, I am not quite sure how to differentiate if the submitted function is defined piecewise. And finally, I would really like to know how I got conditional answers from Solve (or NSolve, not sure) that one time, because that Solution would be much cleaner. Jun15 comment Solution for equation system with piece-wise defined functions No, I definitely need piecewise defined functions. Strictly speaking, this is exactly on of the cases (but not the only one), where I need this function. Want I am trying to do is writing a Module, where you input a "surface" and the starting point and direction of a light beam, and it calculates the light path upon potentially multiple reflection. All in 2D, so curves are enough. Jun15 comment Solution for equation system with piece-wise defined functions I would prefer a general solution, but if nothing else comes, I am willing to give the bounty to an answer that solves the problem for the case where one curve is a straight line and only the other curve is arbitrarily continuous. Also, the first crossing point in a given direction from a defined point on the line would be enough. Jun5 comment Solution for equation system with piece-wise defined functions Hm, this does not consider the "else" case of the Piecewise and it makes the whole thing specific to Piecewise functions. I don't fully understand 1) Why my code does not work, especially numerically and 2) What I did successfully yesterday. Unfortunately I deleted the test code, integrated this into a module and now it stopped working. Jun5 comment Derivative from the left and right Great, I thought so :) My functions are not two crazy, mostly piecewise defined straight lines or short polynominals, so both ways should work just fine. Jun4 comment Derivative from the left and right I think this should do the trick, thanks. Jun4 comment Struct equivalent in Mathematica? This answer is basically what I also do, when working with models in different situations. However, I am often facing one problem: Some values may depend on other values (for example lambda->512, k->2 Pi/lambda). As they may not ALWAYS depend on those values, I cannot integrate them into the model. Until now I just cascade lists of rules, but that is not very convenient. Any ideas? May23 comment Shaping/simplifying equations in a certain way Although it does not seem to be the way to go, this was an interesting thing to learn. Thanks May23 comment Shaping/simplifying equations in a certain way Oh :) I just looked at "Options" :) Thanks again that made a huge difference again. May23 comment Shaping/simplifying equations in a certain way First, thanks a lot, I got it! However, and that may sound stupid: The only option in my documentation is Modulus? o_O Whats the "Simplify option?" Additionally as another complement, that was not evident to me: Collect[expr,Exp[q_]] also works. This is very important for mè because due to the complexity, I do not know x in Collect[expr,x]. Why is Collect not mentioned in the manual page for Coefficients, for example? Feb20 comment Kramers-Kronig in Mathematica @Artes Thanks for the explanation. I work on the optical nm-scale. The Problem was that I forgot thet $\omega\to\lambda$ sustitution for $\text{d}\omega$. Awkward. Feb16 comment Kramers-Kronig in Mathematica @Artes Can you shortly explain why there has to be an error? I think the integral is defined in both ways, as J. M. explained. Also though I don't have performance issues, I do have issues with the result. I differs by 13 orders of magnitude from the MathLab- and the experimental value. I would expect the extrema in an order of magnitude between 10^-4 and 10^-6. As the schape of curve itself looks fine though, I don't think this is an issue of the numerics - though I cannot find an error in my formula. Feb15 comment Working with PhysicalConstants The automatic unit package seems fine. The Convert version ... well, one needs to know what should come out for that. That is not always the case for single factors, for example - at least not without unnecessary thinking. Feb15 comment Kramers-Kronig in Mathematica Wow, thanks. I indeed meant 800-200, this comes from the substitution $\omega$->$\lambda$. Of course I knew J. M. comment, but I thought Mathematica does, too ... Is that a bug, or is there more behind the problem?