« first day (1643 days earlier)      last day (3139 days later) » 

01:53
I fell I have made a great step in my Mathematica knowledge today. I understand Transpose and Flatten second argument. :)
 
3 hours later…
04:36
@Szabolcs I dont see anything...
 
2 hours later…
06:24
@SjoerdC.deVries me neither, but I've seen them earlier
 
3 hours later…
09:54
I have a silly question. Say I have some function that comes with a solution, like NMinimize. You get some output that looks like {X->-0.1} or whatever. I have a whole bunch of these solutions in an array, lets call it r. Is there an easy way to apply Round[] to all of these outputs? So I want to make m = Round[r,0.001] for example. This doesn't work because they aren't numbers but a list of solutions
10:23
@user3183724 Do you mean you want to maintain the form of solutions (consisting of rules, instead of values)?
@kirma Yes, if possible I'd like to do that
do you want all numeric values to be rounded, or only specific variables?
If you simply want to convert numeric values, you can do somethin like r /. x_?NumericQ :> Round[x_, 0.001]
10:42
If you want to round, say, all instances of rule to variable x (literal), it's a bit more complicated: r /. HoldPattern[x -> val_] /; NumericQ[val] :> (x -> Round[val, 0.001])
Of course these can be developed further and abstracted for fancier cases.
Eh, I meant r /. x_?NumericQ :> Round[x, 0.001] in the first case.
11:07
Sorry, I went for lunch. I want all of the numeric values to be rounded, so your first suggestion should work! Thanks!
11:32
@user3183724 :)
 
2 hours later…
13:51
@Szabolcs I managed to set up the WSTP loop such that I can call C++ functions from Mathematica without blocking the loop, but I'm having trouble getting the full two-way connection. When I try using the WSEvaluate (directly or indirectly) the first WSPutFunction returns zero with error message WSEDEAD. You wouldn't happen to have experience with what might cause this?
If not, it's no big deal, for my purposes it's enough to set up a ScheduledTask in Mathematica, which polls new data at regular intervals by calling a C++ function, so I don't necessarily need the two-way connection, but for the purpose of self-answering my question from Saturday, it would be good to be able to set up a fully functional example.
 
3 hours later…
16:38
Would someone please take a look at this and tell me if you think my Proposed duplicate in the comments is in fact a duplicate, or not?
6
Q: How to split text without spaces into list of words?

martinWhat is the best approach to a problem like this in Mathematica? I can only manage this: func[stringlist_] := With[{i = Last@Flatten@ Table[DictionaryLookup[StringTake[#[[2]], n]], {n, 14}]}, {i, StringDrop[#[[2]], StringLength@i]}] &@stringlist; func1[string_] := Rest@NestWh...

Specifically a function I wrote for the older question can be applied here quite directly but the context of the question is a bit different.
 
5 hours later…
21:32
@MartinEnder Sorry, I don't think I can help ...

« first day (1643 days earlier)      last day (3139 days later) »