User Portlet
Discussions |
---|
I'm trying to find an elegant way to bin data into every bisector of a hypercube that is generalizable to any number of dimensions. For example with just 3 dims,[mcode]In[75]:= exdat = Tuples[{0.5, 1.5}, 3] Out[75]= {{0.5, 0.5, 0.5}, {0.5, 0.5,... |
I'm trying to get the following to return "pfam03571" from the XML structure. [mcode]Cases[ XMLElement[ "myelem", {}, {XMLElement[ "INSDQualifier_value", {}, {"Peptidase family M49; pfam03571"}]}], XMLElement[_, {},... |
Inset will probably be easier to work with: [mcode]Graphics[{Opacity[.4], Rectangle[], Inset[Graphics[{Opacity[.2], Rectangle[]}], {1, 1}, {1, 1}, 0.2]}, ImageSize -> 300, ImagePadding -> 0, PlotRangePadding ->... |
Do you need to use Except with EndOfLine? If not, do this work for you? [mcode]In[1]:= StringReplace["x \na \nx \nc", RegularExpression["x.*\n"] -> ""] // InputForm Out[1]//InputForm= "a \nc" In[2]:= StringReplace["x \na \nx \nc", {Shortest["x" ~~... |