« first day (469 days earlier)      last day (4024 days later) » 

1:07 AM
@Verbeia I will play with those. But, yes email works just fine. Being a mod with super powers, take my first name concat it to my last initial at wolfram.com.
 
 
1 hour later…
2:19 AM
@rcollyer thanks! message sent
 
 
2 hours later…
3:52 AM
@Verbeia "interesting" stuff. will look into it.
 
 
4 hours later…
7:53 AM
@halirutan yes, they are certainly the same person. In fact if you look at Sjoerd's answer, subbu has even replied to a comment under niren's account. I don't think it particularly matters if users have multiple accounts, since clearly in this case it isn't an attempt to circumvent a suspension or something like that.
@drN this policy really seems silly to me. If they are offering a trial, why not have it fully functional so that people can evaluate it properly? It's hardly as if someone who plans to use it only once is going to buy it anyway (or if they do they'll probably ask for a refund soon afterwards) so I don't see how they lose anything by having the trial version able to save or print. In fact I would think that this approach is likely to lose them more potential customers than the alternative.
 
 
3 hours later…
drN
10:40 AM
@OleksandrR. Silly or otherwise, I have procured version 9.0 through my school... oh well.... what can one do about it?
 
 
3 hours later…
drN
1:12 PM
I am trying to understand what in the world is going on with this answer. The I have a 7x7 array which I am ArraPlot-ting and would like to have the values labeled like in this answer. However, i am unable to center the values.
 
1:37 PM
International Workers' Day (also known as May Day) is a celebration of the international labour movement. May 1 is a national holiday in more than 80 countries and celebrated unofficially in many other countries. History International Workers' Day is the commemoration of the 1886 Haymarket affair in Chicago. The police were trying to disperse a public assembly during a general strike for the eight-hour workday, when an unidentified person threw a bomb at them. The police reacted by firing on the workers, killing four demonstrators. "Reliable witnesses testified that all the pistol fl...
 
@drN The Reverse[#2 - 1/2] centers the Text.
 
drN
@MichaelE2 I realized that but with [#2 -1/2] my labels are translated.. I can't seem to center them in the right cell. The cell which should have say, a label of 0.5 doesnt
 
@drN Can you show your code?
 
drN
1:56 PM
@MichaelE2 This is funny... my error was resolved once I restarted mathematica.. I'll try to re-create it if i can....
 
@drN Probably had a definition you forgot about.
 
drN
2:08 PM
Nope.. it doesnt look like a definition. So here is my data: `{{0., 0., 0.0909646, 0.0632109, 0.}, {0., 0., 0.183021, 0.0956274,
0.0561544}, {0.139856, 0.482994, 0.0674223, 0.0962637,
0.}, {0.082486, 0.061249, 0., 0.135028, 0.}, {0.146973, 0.0990641,
0.12588, 0., 0.}}`.

And my `ArrayPlot` command with `Epilog`:

`mat = FData[[1 ;; 5, 1 ;; 5]];
ArrayPlot[mat,
Epilog -> {Red, MapIndexed[Text[#1, Reverse[#2 - 0.5]] &, mat, {2}]},
PlotLegends -> Automatic]`

Theres something strange going on...
 
@drN You need to reverse mat in MapIndexed
MapIndexed[Text[#1, Reverse[#2 - 0.5]] &, Reverse@mat, {2}]
 
drN
@MichaelE2 I see that my ArrayPlot values have been switched.... I did Reverse and without but didn't quite work.
 
Otherwise, everything is centered for me.
 
drN
No, the labels are all wrong now.
What is 0 in the data is not labeled with a 0 in the arrayplot
@MichaelE2 Never mind... I think I'm being an idiot again. need to take my anti-stupid medication today!
 
@drN No problem. So it's ok?
 
drN
2:12 PM
@MichaelE2 Yes.. I didn't realize that I was using an older version of my notebook... I'll keep at it and see if all is well though.
 
@drN Great. Hope everything goes well!
 
drN
@MichaelE2 tnx! :)
 
 
2 hours later…
3:54 PM
@Szabolcs Any progress on the uploader?
I miss it sooo much ;-)
 
4:05 PM
any mod around?
@halirutan hi!
For the mods. Strange coincidences. Look:
1
Q: Error/warning when using NSolve for simple equation

niles_1710373I am using NSolve to solve an equation, as shown here: T == (0.000250709 E^(0.0269867/(0.0000734429 + 1. T)))/(1.00025 - 1. E^(0.0539734/(0.0000734429 + 1. T))) NSolve[T == (0.000250709 E^(0.0269867/(0.0000734429 + 1. T)))/(1.00025 - 1. E^(0.0539734/(0.0000734429 + 1. T)))...

and
0
Q: Faster alternative to NSolve

BillyJeanI have an equation, which I am trying to solve using NSolve in Mathematica. Here is how I do it: T == (0.000242895 E^(-(2.09472*10^11/(5.70068*10^8 + 7.76206*10^12 T))))/(1 + 0.969073 E^(-(4.18945*10^11/(5.70068*10^8 + 7.76206*10^12 T))) - 1.96883 Cos[8.77331*10^6/(2.28027...

 
@belisarius Hi. Why do you consider the difference between old and new ListSurfacePlot3D annoying?
Btw, I was criticizing the OP not the downvoters.
 
@halirutan I just wasn't able to figure out wht he was talking about
 
@belisarius That's why I criticized him.
@belisarius I'm preparing to edit the question because I think it is a nice one.. deep inside..
 
4:39 PM
Can we have some more reopen votes on this one please:
-4
Q: Difference of old Graphics`Graphics3D`ListSurfacePlot3D and the current ListSurfacePlot3D

HyperGroupsConsider the following example data which creates the lines of a cylinder data=Table[{Cos[phi],Sin[phi],z},{phi,0,2Pi,.1},{z,0,1,.1}]; Graphics3D[{RandomChoice[ColorData[3,"ColorList"]],Line[#]}&/@data] The coloring indicates the structure of data which is a list of lines where with lines I ...

 
4:59 PM
@Ghersic Hello.
 
@Mr.Wizard Hello, how are you?
 
Fine, thanks. Glad you could make it. Do you have the data file uploaded as I asked?
 
I have the notebook file and can upload it. I am a little unfamiliar with the system here though. Let me figure out how to upload it really quickly.
 
@Ghersic See if this site works: filedropper.com
Also, please include the data file you are importing, unless it is huge.
Actually, I just noticed that you said you used "ExcelRead with ExcelLink" -- I don't have ExcelLink but I'll see what Import does for me.
 
@Mr.Wizard Can you reopen this above question? I rewrote it.
 
5:05 PM
@halirutan I reopened it without reading it; don't disappoint my trust. ;-)
 
@Mr.Wizard let's hope I don't ;-)
 
@halirutan I think @Ghersic may be having trouble uploading a file; do you know of a good binary file host for one-off use?
 
@Mr.Wizard We used to use our GitHub account for that, but they stopped providing the upload of single files through their web-interface.
 
@Ghersic are you still with us?
 
So this is no option anymore (except you like to clone the whole repository everytime).
The other thing is the possibility to upload stuff as png image which someone implemented.
Let me find the post:
Hmm, I don't find it.
 
5:11 PM
@Here we go, sorry for the delay.
I uploaded a .zip containing the notebook, the excel file I imported the data from, and the .mx file I load to, I think it's called, "reload the kernel state" so that the definitions I've created are still usable upon re-loading it.
@Mr.Wizard In case it's important, I used ExcelLink to import the data from the excel file, and that is where the first few lines of code come from. However, if you use the DumpGet command and point it towards the .mx file I uploaded it should redefine the "data" term as the table I'm hoping to manipulate.
 
@Ghersic Okay, one minute please.
 
@Mr.Wizard No rush, thank you for looking at it for me. You'll no doubt chuckle my novice.
 
Well here's a laugh for you: my old tools are making this difficult. You see, .mx file are platform dependent so I cannot use that, and I'm afraid version 7 doesn't like XLSX files very much. Is it possible for you to save that file as an old-school .xls file and upload again? (Sorry.)
@Ghersic hang on; is the data in the Notebook after data = ExcelRead[ExcelSheet["plate1"]] sufficient to illustrate the rest of the data?
 
drN
Since the vector analysis package is now obsolete in mma 9, how should I run scripts that have vector analysis stuff that I had written previously with mma 8?
 
@drN Sorry, I don't know. (v7 user)
 
5:23 PM
Yes it should be. Just in case, I did upload the .xls file. Sorry, I should have realized I should generalize it.

http://www.filedropper.com/04-22-13dataprocessed
 
drN
Since I got the "obsolete" message and my script just did not run, I dropped the Needs["VectorAnalysis"]` line and that errored out too!
 
P.S. - I hope you don't laugh too much that each drug
drug's dataset consists of four measurements ranging from 5m to 24h. My background is in physics which makes this seem a little short on data, but the people I'm working for are biochemists... ;).
@Mr.
@Mr.Wizard Also, only the first four points are crucial to what I'm trying to do at this point, the latter 4 after the one "Empty" cell in each list are the respective standard deviations, and are less important.
 
@Ghersic I've looked over your Notebook and you are doing what I thought you might be, and yes, it's inefficient. There are several ways to approach this, and it partly depends on how you want to handle (work with; access) the data. Do you wish to reference each record by name, e.g. "AP6_173" or do you usually expect to operate on all (or thirds) of the list at the same time?
 
Usually I'll be operating on thirds at a time or less (that is, larger fractions than a third at a time), only needing to specify each dataset (drug's) at the start (first column) of the table when I'm graphically representing the data.
oops, each drug's name, that is
 
(Sorry for being slow to respond; I'm easily distracted.)
 
5:31 PM
That's ok, I am too, and the time you're saving me from the inefficiency of my current notebook surely has us net positive! :)
 
But when you are graphing the data, you wish to manually specify a series of drug names?
 
Yes, Legending is an ongoing process, but at the bottom of the notebook I have a sample of one of the graphs made from 1/3 of the 26 different datasets.
Only in displaying which line is which dataset will I be trying to manually reference each drug name (or so I thought).
Ack, pay no mind to the faulty FirstDrugsLegend entry above the ListLogLinearPlot.
 
(Sorry, be right back; phone call)
 
No problem, take your time.
 
@Ghersic I did not understand the answer so I'll ask again as this is fairly important: right now in the graph (ListLogLinearPlot) you have only FirstDrugs, and earlier when you list the drug names in AllDrugsList you list (naturally) all the drug names in order. If you do not need (frequently) access the drug data in random order by name, but would instead like to reference "all drugs" or "first third" and let the program do the rest... (continued)
... I may use a different data format than if you expect to do something like myPlot[{"drug3", "drug17", "drug9", "drug14"}, (* options *)] (a customized plot function by drug name).
I hope my question is making sense. :-)
 
5:44 PM
I think it does. As long as I can Legend the drugs relatively easily, which I think is accomplishable regardless probably, I'm alright with simply letting the program do each for me on the level of individual drugs. (The first of the two above posts says ... (continued) but I don't see a way to expand it, so I may be missing a detail here)
 
I typed (continued) manually just so you'd know there was more coming; the chat software said my message was too long.
 
Ohh, alright!
My entire setup, really, is subject to change at this point. The setup you described in generating {{"cat", {5, 8}, {10, 18}, {20, 9}, {1440, 1}},
{"dog", {5, 19}, {10, 15}, {20, 15}, {1440, 7}}, ...} in your answer seemed perfect.
Your answer to my question, here that is:

http://mathematica.stackexchange.com/questions/24242/efficient-data-entry-manipulation-with-many-datasets
 
Tell you what, I'll show you both formats if we have time. Let me start more conceptually.
Though I know it includes parts that you didn't ask to focus on, there are several places in the Notebook where you start operating on each part of the list (each drug data record) manually, e.g.:
AP6156z = Take[AP6156, 4 ;; 4];
AP6157z = Take[AP6157, 4 ;; 4];
AP6158z = Take[AP6158, 4 ;; 4];
AP6159z = Take[AP6159, 4 ;; 4];
AP6160z = Take[AP6160, 4 ;; 4];
AP6161z = Take[AP6161, 4 ;; 4];
etc.
 
That sounds great. If there's a way to provide reputation or "upvotes" for you I certainly would.
The "z" entry was in transit to extract the point at which I would insert a text legend (hopefully using epilog) as it was the only way I knew how to go about that.
 
Anytime you find yourself writing code like this it should be a flag that you're working too hard. :-) This would be true for any high-level programming, really, but Mathematica in particular is well set up to operate or lists, arrays, and tensors.
 
5:51 PM
Alright thank you, I'm glad to hear that and thought Mathematica was known for it's efficiency.
 
Also, every expression in Mathematica is a data tree of sorts, which you can graphically represent on screen with TreeForm.
There are a number of tools for operating across the parts of rectangular arrays, and also for manipulating expression trees.
 
@Mr.Wizard Hi!
 
I say this so that you can start to think about operating on groups of similar objects rather than individual elements manually.
Hi @belisarius -- something on your mind?
 
@Mr.Wizard Have you seen the paired questions I linked above? Most curious!
 
@Ghersic you should bookmark this for later reading.
@belisarius No, let me take a look now.
 
5:54 PM
Ok, tell me what do think
 
TreeForm does seem good for conceptualizing how Mathematica portrays the data. Thank you, I'll read that ASAP.

Hello beli I have heard of you around the forums!
 
@Ghersic HI!
"heard of you" may sound menacing :)
 
@belisarius I'm a bit slow today (okay, who am I kidding: as usual) -- what are you suggesting regarding these posts? Supposing they were from the same author what do you think should be done?
 
@Mr.Wizard I don't think they came from the same person. They seem minor variations on the same theme, something like "personalized homework" ... and they both posted it here :)
 
@belisarius In case I'm forgetting what is visible to non-moderators let's just say I don't think that's the problem.
Wait, I'm not a mod on SO and I can see the link; look, they are they same person: stackoverflow.com/users/1710373/billyjean
The profiles are linked; it's just a cross-post.
 
6:01 PM
@Mr.Wizard yep you're right
 
Anyway, let me get back to @Ghersic before I completely forget what I'm doing. :^)
@Ghersic let me give you a simplified conceptual example of what you are doing, and how you might do it differently.
a = {1, 2, 3};
b = {4, 5, 6};
c = {7, 8, 9};
a2 = a[[2]];
b2 = b[[2]];
c2 = c[[2]];
 
@Mr.Wizard In any case, the equations are different (but very similar). Enough said about that :D
 
^This is what you have. Manual repetition of the same operation on multiple objects.
Instead, you might write this:
abc = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
abc2 = #[[2]] & /@ abc;
the content (value) of abc2 is {2, 5, 8}
This is done by creating a "pure function" (look up Function in the docs) with a single parameter represented by # (short from of Slot[1] -- look up Slot).
 
Kk.
 
This is then "mapped" across the list abc (an array is just a list of lists in Mathematica) using the function Map, which has the short notation /@.
A simpler example is: f /@ {1, 2, 3}
 
6:07 PM
Yes that was my next question.
 
@belisarius Not yet, my friend. :^)
 
hehe
 
Also, please understand that these operations are not limited to lists (that is, expressions with head List when displayed with FullForm, and typically entered with {}), but can apply to other expressions. Here is another example: f /@ ("q" + "r" + "s") which yields f["q"] + f["r"] + f["s"]
Other function names for you to look up later are Apply, Table, and Scan.
 
I will.
 
Now, as @belisarius pointed out above (now removed) there can be even better ways to perform such operations. In this particular case (the abc array) you could use abc2 = abc[[All, 2]], which will typically be much faster than mapping, when it is applicable. You could also Transpose as he did, and then use Part.
 
6:13 PM
That makes sense, my previous attempt included Tranpose and Part.
 
Likewise, there are internal functions that have the attribute Listable, which automatically apply themselves across lists, e.g. Plus, allowing: abc + 5 to yield {{6, 7, 8}, {9, 10, 11}, {12, 13, 14}}. I am however getting off topic now.
 
ahh yes
That is good to know.
At a previous point in data analysis I have to subtract the average background fluorescence of the samples, the 'Plus' and 'Listable' functions seem like they would be good for this.
 
@Ghersic Are you manipulating images?
there are a lot of specialized functions for that
 
Indeed. Now, returning to your Notebook, with the data we can do this:
Part[data, 2 ;;, 1 ;; 5]
 
Only datasets for now, in the hopes I might ListLogLinearPlot a large number of relatively small datasets.
 
6:17 PM
The output is like:
 
kk
 
{{"AP6_156", 28.5708, 32.0251, 37.5862, 66.8786}, {"AP6_157", 78.3041, 82.9332, 87.6697,
96.6977}, {"AP6_158", 13.3031, 14.4117, 16.9699, 37.382}, . . . }
 
Yes.
 
You can see that we are able to combine Part and Rest operations, and also process the data all at once.
Now, for the data format I wish to introduce another concept: replacement rules. You can create a list of rules (look up Rule) like this:
rules = {"one" -> {5, 2, 1}, "two" -> {7, 6}, "three" -> {0, 19, 4}};
Using "two" /. rules recalls {7, 6}. The operator /. is short for ReplaceAll.
This allows you to easily access a record by name.
To convert your data I will use a named auxiliary function (like the one in my earlier answer), but it could be done using "pure functions" as shown above with #[[2]] &.
 
Sorry, what is the significance of the {7, 6} specifically? Are those positions in the list? This answer may be in Rule documentation, I suppose.
for rule "two", that is
 
6:24 PM
Ah, sorry. {7, 6} is arbitrary data belonging to the name "two". It doesn't need to be a list.
 
Ah alright that is much easier. Thanks
 
The point is that by using this format we can easily recall individual data records.
 
ok
 
By the way, pardon me if I hit you with too many new concepts; I'm not very good at separating these things and tend to use them all at once. :-)
 
thats ok, I think I follow so far
 
6:28 PM
Alright, consider this:
recordToRule[{name_String, data__}] := name -> Transpose[{{5, 10, 20, 1440}, {data}}]
This code uses SetDelayed (short form :=) to create a new function named recordToRule.
The pattern on the left-hand side: {name_String, data__} matches the individual records output by Part[data, 2 ;;, 1 ;; 5] as described above, and does destructuring (bookmark for later).
The object name_String is a pattern (look up Pattern) named name, that needs to have the head String (which strings implicitly do). This is part of a list { } which literally matches the list in the record.
There remains the pattern data__ -- this is a pattern named data which matches any remaining sequence of arguments (elements) in the list.
You will need to look up Blank and BlankSequence in the help for examples.
Incidentally, replacement rules can use the same patterns.
what this function does when applied to the expression {"ghersic", 1, 2, 3, 4} is to match the parts described by the patterns, and substitute them into the expression on the right-hand side of the definition, e.g. "ghersic" -> Transpose[{{5, 10, 20, 1440}, {1, 2, 3, 4}}]
 
_String signifies that this specific pattern, name, is being created into a time-series representation
think I understand so far. Will look up these links.
yes.
 
@Ghersic Wait, I don't know what you mean. _String signifies a pattern that matches "a string" but not aSymbol or 3.14. Is that understood?
 
I'm not sure I said that right, but your subsequent comment confirmed what I was at least trying to say I think.
ahh ok
 
Great. Understand that the pattern names such as data are localized to the SetDelayed definition. For example data in recordToRule has no relation to the table which you named data in the Notebook. This concept of localization is important, and it is important to understand when it is and is not being applied. For example, definitions made with Set (=) do not localize.
Putting this together we have:
ruleData = recordToRule /@ Part[data, 2 ;;, 1 ;; 5];
 
so here I would say `recordToFule[{AP6156_String, data__}] := AP6156 -> Transpose[{times}, {data}}]

Gotcha
Ah alright.
 
6:41 PM
ruleData should now look like this:
{"AP6_156" -> {{5, 28.5708}, {10, 32.0251}, {20, 37.5862}, {1440, 66.8786}},
 "AP6_157" -> {{5, 78.3041}, {10, 82.9332}, {20, 87.6697}, {1440, 96.6977}},
 "AP6_158" -> {{5, 13.3031}, {10, 14.4117}, {20, 16.9699}, {1440, 37.382}}, . . .
 
yes yes yes. this is getting exciting.
 
You can now do several different things with this. You can get a list of names:
names = First /@ ruleData
You can get just the data:
dataonly = Last /@ ruleData
You can access specific records by name:
{"AP6_168", "AP6_159", "AP6_178"} /. ruleData
@Ghersic I'm glad. Please take a few minutes to experiment with this. I'll then answer any questions about these specific methods, and then I'll need to leave for the day. We can continue tomorrow.
 
Sounds good. I'll do that
 
By the way, you can bookmark any comment in this chat by hovering the pointer over the comment, then clicking the down-arrow that appears at the left side just to the right of the user name, then clicking/copying the "permalink".
 
Ahh ok thank you, I've been taking snippets using snipping tools to reference our conversation, haha.
It seems to give errors at the ruleData = recordToRule /@ Part[data, 2 ;;, 1 ;; 5]; phase of permutation of each drug is longer than the dimensions {1, 4} of the list. hrm...
 
6:54 PM
@Ghersic what do you get form Part[data, 2 ;;, 1 ;; 5] by itself? Any errors?
 
Doesn't seem to be, simply each drug name followed by its four values, identical to the permutation that {y1, y2, y3, y4} that the error shows.
 
I don't have much more time to debug this, but are you using this definition verbatim?:
recordToRule[{name_String, data__}] := name -> Transpose[{{5, 10, 20, 1440}, {data}}]
(Also, try ClearAll[recordToRule] before running that.)
 
Aha, it worked! Some typo of mine, surely. Thank you very much, Mr. Wizard. That was some kicking of knowledge, I appreciate it.
 
Okay, cool. :-) Shall we continue at 1700 UTC tomorrow?
 
I'll continue to work with this today. Would slightly earlier be alright with you? I'm hoping to sit in on a group meeting the lab is having tomorrow around then. If not, I'm free the entirety of the day after that and can log on at your convenience.
 
7:00 PM
Earlier is actually better. 1500 UTC?
 
Sure, that would be great, our lab meeting starts at roughly 1630 UTC. Thank you again!
 
Alright, see you tomorrow. Bye now.
 
Bye!
 
 
2 hours later…
8:59 PM
posted on May 01, 2013 by Oleg Marichev

A century ago, Srinivasa Ramanujan and G. H. Hardy started a famous correspondence about mathematics so amazing that Hardy described it as “scarcely possible to believe.” On May 1, 1913, Ramanujan was given a permanent position at the University of Cambridge. Five years and a day later, he became a Fellow of the Royal Society, [...]

 
9:52 PM
How can I take the first and third columns of a matrix?
 

« first day (469 days earlier)      last day (4024 days later) »