| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
Hallo Daniel,
heutzutage
In[33]:= SystemInformation["Small"]
Out[33]= {"Kernel" -> {"SystemID" -> "Windows-x86-64",
"ReleaseID" -> "10.1.0.0 (5292918, 2015032402)",
"CreationDate" ->
DateObject[{2015, 3, 24},
TimeObject[{11, 30, 37.}, TimeZone -> 2.], TimeZone -> 2.]},
"FrontEnd" -> {"OperatingSystem" -> "Windows",
"ReleaseID" -> "10.1.0.0 (5292918, 2015032301)",
"CreationDate" ->
DateObject[{2015, 3, 23},
TimeObject[{22, 46, 3.}, TimeZone -> 2.], TimeZone -> 2.]}}
würde man natürlich mit den Daten
Clear[r1, rW]
r1 = {2.272727273`, 1.33037694`, 3.112840437`, 1.5625`, 0.288184438`,
0.49382716`, 1.685393258`, 0.215053781`, 1.538461477`,
3.100775194`};
rW = {10, 4, 11, 5, 7, 9, 8, 4, 11, 6};
wegen
In[24]:= Gather[
Sort[Transpose[{r1, rW}], Floor[First[#1]] < Floor[First[#2]] &],
Floor[First[#1]] == Floor[First[#2]] &]
Out[24]= {{{0.215054, 4}, {0.493827, 9}, {0.288184, 7}}, {{1.53846,
11}, {1.68539, 8}, {1.5625, 5}, {1.33038, 4}}, {{2.27273,
10}}, {{3.10078, 6}, {3.11284, 11}}}
und
In[32]:= {Length[#], Total[Last[Transpose[#]]]/Length[#]} & /@
Gather[Sort[Transpose[{r1, rW}],
Floor[First[#1]] < Floor[First[#2]] &],
Floor[First[#1]] == Floor[First[#2]] &]
Out[32]= {{3, 20/3}, {4, 7}, {1, 10}, {2, 17/2}}
einfach
ListPlot[Transpose[{Length[#],
Total[Last[Transpose[#]]]/Length[#]} & /@
Gather[Sort[Transpose[{r1, rW}],
Floor[First[#1]] < Floor[First[#2]] &],
Floor[First[#1]] == Floor[First[#2]] &]], Joined -> {True, False}]
sagen und das Bildchen erhalten.
Natürlich ist es gut, beide Listen paarweise zusammenzubehalten.
Nun haben Sie in Mathematica 5.2 kein Gather
(http://reference.wolfram.com/language/ref/Gather), aber Sie können sich
leicht eins beschaffen, indem Sie die Paare mit dem gleichen Floor des
zweiten Elements in dieselbe Teilliste selektieren und dies über die in
Frage kommenden Floor-Werte "mappen". Just have a try!
Grüsse Udo.On Tue, 07 Apr 2015 20:15:46 +0200, Daniel Wehrli via demug <demug@XXXXXXX.ch> wrote:
Ich bin im Besitz von Mathematica 5.2 Thema: Kompliziertes Sortierproblem, Zusammenfassungsproblem, Durchschnittberechnungspoblem
dmugWehrli.PNG
Description: PNG image
_______________________________________________ DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch http://www.mathematica.ch/mailman/listinfo/demug Archiv: http://www.mathematica.ch/archiv.html
| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
DMUG-Archiv, http://www.mathematica.ch/archiv.html