1,465 reputation
623
bio website
location
age
visits member for 2 years
seen 2 days ago

Dec
16
comment how to get continuation of square matrices with periodic diagonal band automatically?
@bills Thank you for suggesting FindLinearRecurrence. But I found that FindLinearRecurrence needs at least 5 elements in a list. So I think I just stick with Tally approach which is easy and understandable.
Dec
15
comment how to get continuation of square matrices with periodic diagonal band automatically?
What you gave is a manual version.
Dec
15
comment how to get continuation of square matrices with periodic diagonal band automatically?
Thank you! I know band function. But you misunderstood me. I want a function continuation which can automatically analyze any square matrix mat we feed to it, and give general version continuation[mat]?
Dec
14
comment How to transform power of -1 into exponential
Thank you for pointing this out!
Dec
13
comment about the design of Part related to Association
@SimonWoods Well, My last question is actually a question about the transparency of Association. Since assoc[[1]] directly acts on values of assoc, then why doesn't assoc[[span]] gives collection of values? I admit I made a mistake. Like you said, original head should be preserved. Then, <|"a" -> 1, "b" -> 2, "c" -> 3, "d" -> 4|>[[1;;2]] should give <|1,2|>, but this is not an association!It is a contradiction! So they must make it as <|"a" -> 1, "b" -> 2|>. Wow, maybe this is what the creators of Association thought in their mind!!! You enlightened me!:) What do you think?
Dec
13
comment How to transform power of -1 into exponential
Thank you! What if I also want to transform -1 into E^[I π]?
Dec
13
comment about the design of Part related to Association
@SimonWoods It still confused me now, and according to Taliesin Beynon's comment, if seems that Association is not mature at present stage, am I right?
Dec
13
comment about the design of Part related to Association
@SimonWoods But the FullForm[<|"a"->1|>] gives Association[Rule["a",1]]. There is Rule.
Dec
13
comment about the design of Part related to Association
@SimonWoods But why <|"a" -> 1, "b" -> 2, "c" -> 3, "d" -> 4|>[[1]] doesn't give "a" -> 1?
Dec
13
comment about the design of Part related to Association
@Nasser I think this inconsistency is awkward. It declares that there is a special case in using Part in Association, not elegant. What do you think?
Dec
13
comment about the design of Part related to Association
@Nasser Yeah, it is definitely not a bug. They designed it in this way! They write these example in the help doc. But it just doesn't consistent with Part of List.
Dec
3
comment How to check if a 2D point is in a polygon?
@rm-rf Thank you! You're right.
Dec
3
comment How to check if a 2D point is in a polygon?
@rm-rf Thank you! kguler told me using ??*`*PointWindingNumber* could see which package that PointWindingNumber belongs to. But I found V10 gives both Mesh and PolygonUtils, you can see here imgur.com/bCIANiR, then why Mesh didn't work any more?
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler Oh, wildcard! I understand! And this is my v10 version gives imgur.com/bCIANiR, it is quite odd that mesh didn't work.
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler Please forgive my verbose comment, I know ?? is for Information, but what does those "*" mean here? And when I type ??**PointWindingNumber*, v10 gives both "GraphicsMesh" and "GraphicsPolygonUtils", so why "GraphicsMesh`" didn't work any more?
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler Wow, thank you! Much faster now, though GraphicsPolygonUtilsPointWindingNumber doesn't include points threaded by polygon edge. Could please show me how can you find the package moved to PolygonUtils? Because if I search PointWindingNumber in help documentation, it doesn't give any result.
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler Another question, where is GraphicsMeshPointWindingNumber now in V10? Deleted?
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler Ok. By the way, I just tested RegionMember, but I found it much slower than your original testpoint version, and also much slower than GraphicsMeshPointWindingNumber when I used it in v9
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler Wow, you're so familiar with new features in v10. I was wondering if you already known RegionMember before I posted my question?
Dec
3
comment How to check if a 2D point is in a polygon?
@kguler And for the first version of testpoint, sometimes it encounters error message "ArcTan::indet: "Indeterminate expression ArcTan[0.,0.] encountered"", if the edge of polygon passes points.