Timeline for Pattern matching & simple replacement
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 21, 2015 at 7:14 | comment | added | Kuba | @Marcel Thanks, good luck :) | |
| May 21, 2015 at 7:12 | comment | added | Marcel | yeah, I thought the same:D That wouldn't be worth it ^^. I will definitely try to understand what you did (at some point in time :D). Thanks for your advice and have a nice day! | |
| May 21, 2015 at 7:09 | comment | added | Kuba | @Marcel Then definitelly I'm not going to explain this :D it would be endless. Put a cursor on a function and press F1 to lear more. Also: reference.wolfram.com/language/guide/Patterns.html go there, take a look at thos functions and go through tutorial listed in LearningResources section. | |
| May 21, 2015 at 7:06 | comment | added | Marcel | Nothing is clear:D I don't know all those mathematica commands:D like FreeQ, Map, Times, ... :D so far I only use mathematica to integrate and simplify stuff:D and simple replacements using x_ and so on as patterns. | |
| May 21, 2015 at 6:59 | comment | added | Kuba | @Marcel Yes, feel free if anything is not clear then. :) | |
| May 21, 2015 at 6:58 | comment | added | Marcel | yes it worked. perfect! Now How can I understand what you did:D I should do a tutorial on pattern matching, I guess :) | |
| May 21, 2015 at 6:56 | comment | added | Kuba | @Marcel sorry, fixed typo. | |
| May 21, 2015 at 6:56 | history | edited | Kuba | CC BY-SA 3.0 | added 1 character in body |
| May 21, 2015 at 6:55 | comment | added | Marcel | hm, I copied the code and replace expr with my expression. What I got now is th. like that 0[1/2 cA plusd[ 2/(-1 + x) + sa1^2/( 2 mgl^4 + 4 mgl^2 sa1 + 2 sa1^2 - 4 mgl^2 sa1 x - 4 sa1^2 x + 2 sa1^2 x^2) - (sa1^2 x)/( 2 mgl^4 + 4 mgl^2 sa1 + 2 sa1^2 - 4 mgl^2 sa1 x - 4 sa1^2 x + 2 sa1^2 x^2) + (2 Log[1 + mgl^2/sa1 - x])/(-1 + x)]] so, everywhere is now a zero as a factor. Sorry, I don't understand that much mathematica :) | |
| May 21, 2015 at 6:52 | history | edited | Kuba | CC BY-SA 3.0 | added 900 characters in body |
| May 21, 2015 at 6:50 | comment | added | Marcel | hm, now I have all the terms expanded, but those terms are still in the expression after your replacement rule. | |
| May 21, 2015 at 6:48 | comment | added | Marcel | ah, you are right. I wanna expand, yes:D. That I only have a sum of terms. So, expanding the expression beforehand will work, right? I will test :). Thanks a lot :D | |
| May 21, 2015 at 6:46 | comment | added | Kuba | @Marcel Currently each term has plusd inside. What is term in your question then? Do you want to ExpandAll? About pattern matching, take a look at PatternTest and ReplaceAll. | |
| May 21, 2015 at 6:34 | comment | added | Marcel | Hello, thanks for your reply. Yes, it works. But can you explain the code a bit more. For pattern matching the only thing I know is sth like x__ and x_ :D. And the code does not neglect all the other factors which are not multiplied by plusd[]. Or better it does neglect them, but I wanna set them to zero :D. Thanks in advance! | |
| May 21, 2015 at 6:29 | history | answered | Kuba | CC BY-SA 3.0 |