你可以做類似
Column[Style[#[[1]], Background -> #[[2]]]
& /@ ({LinearModelFit[#[[1]], x, x]["ParameterTable"], #[[2]]}
& /@ {{listA, Yellow}, {listB, Red}})]
![enter image description here](https://i.stack.imgur.com/YJpAQ.png)
編輯
你必須要工作了這一點A L如果你想要一個直接的結局,那就更多。喜歡的東西:
listA = {5, 10, 6, 9, 10, 9, 8, 0, 4, 2};
listB = {2, 8, 7, 1, 7, 6, 10, 5, 1, 5};
tit = {"", "Estimate", "Standard Error", "t\[Hyphen]Statistic",
"P\[Hyphen]Value"};
Grid[Flatten[
Join[{{tit}}, (Join[{#[[1]]}, #[[2]]] & /@
Partition[(Riffle[#["BasisFunctions"], #["ParameterTableEntries"]] &@
LinearModelFit[#, x, x]), 2] & /@ {listA, listB})], 1],
Background -> {{White, {None}}, {None, {Pink, Pink, Yellow, Yellow}}},
Dividers -> {2 -> True, 2 -> True},
Frame -> {{True}, {True}},
FrameStyle -> Directive[Thickness[2], Blue]]
![enter image description here](https://i.stack.imgur.com/EsI9M.png)
是的,我的確和糾正爲好。我很疑惑你的評論是在4分鐘前,我在17分鐘前編輯了這個錯誤!? – 500