@belisarius could you take a look at this page? The font is coming up super small for me. Perhaps I managed to mess up my browser settings when I was testing different Zoom levels for the survey, but I cannot seem to reverse it.
@belisarius Beautiful, isn't it? I have been reading it again after a span of a few months, and when I got to that section (and also the succeeding section on "the tyranny of the blank screen"), I was very much reminded of Mathematica...
@belisarius If I may: I submit that a lot of philosophical notions get distorted somewhat when one attempts to translate them into a language quite different from the original.
@JM Just briefly skimming that. Looks very interesting. I particularly like the section header "The Foibles of Computer Systems."
I am convinced that computer systems are slowly driving us mad. It has been said that doing the same thing over and over again and expecting a different result is the definition of insanity. Well, anybody who has attempted to put paper money in a vending machine must be certifiably insane as it forces you to do the same thing over and over again in an attempt to get that damned candy bar!
Can someone explain to me, what happens in this question on mine? I wanted to write something like
$KernelID and $ProcessID
but in the question it seems like the LaTeX markup got confused:
Is there a way to prevent this?
Note: There seems to be a lot of support for having our own blog, and we have several volunteers, so I've added the feature-request tag to this post to draw the attention of the SE team and hopefully set up a blog.
Update: Here's some info on creating/requesting a blog.
Several StackExchan...
Quick question(I am a beginner). Is possible to make Table[] command generate lists depending on the some kind of condition set within Table. in other words, can "expr." have some kind of conditional statement ??? Table[expr.,{i,i_min,i_max, dx}]
so you want imin and imax to depend on the value of expr?
@OleksandrR In itself it's imaginable that two different versions produce different results. Maybe they have improved the techniques used to make the estimates.
no, when Table spits out the results, I want the results to depend on the condition set within the expr. example: Table[i^2, {i,1,10}] = {1, 4, 9, 16, 25, 36, 49, 64, 81, 100}. What if I want only values greater than 9. Can I set expr within Table to have condition ?
@newprint A quick experiment with Condition says that it doesn't work inside of Table: Table[i j /; i > j, {i, 3}, {j, 3}] produces {{1 /; i > j, 2 /; i > j, 3 /; i > j}, {2 /; i > j, 4 /; i > j, 6 /; i > j}, {3 /; i > j, 6 /; i > j, 9 /; i > j}}, but you can use If: Table[If[i >= j, i j], {i, 3}, {j, 3}] to produce {{1, Null, Null}, {2, 4, Null}, {3, 6, 9}}, but you have get rid of the nulls.
A method to do that is to return a Sequence[], instead: Table[If[i >= j, i j, ## &[]], {i, 3}, {j, 3}] which produces {{1}, {2, 4}, {3, 6, 9}}. Note: ## &[] is effectively Unevaluated[ Sequence[] ].
Yes, that will work, except you will have to deal with `Null`: `Block[{f}, f[x_] := If[x < 10, x]; Table[f[i], {i, 15}] ]` returns `{1, 2, 3, 4, 5, 6, 7, 8, 9, Null}`.
A method, if you don't wish to change f, is to temporarily change the definition of Null: Block[{Null = Sequence[]}, Table[f[i], {i, 15}] ] returns {1, 2, 3, 4, 5, 6, 7, 8, 9}.
@Heike Definitely, but I think that requires a second pass, and may (I haven't tested it) be slower.
If you don't mind I have couple other short questions:
1) in C++/C within F() you can have return statement anywhere you want. I have looked though the Math. docs, and didn't see anything similar. Only in Module f[]:= Module has this option. 2) Is it possible for the function to return a set (In C++ you can return a pointer to an array)list
@newprint I'm not sure what is meant by "return a set" in this context. Since you hint at the idea of a pointer, all functions are return a value, not a pointer.
@newprint Rather than Return, it's probably better to use Throw/Catch. The second part of the question I don't quite understand. A set list? A set? A list?
@OleksandrR I have tried to make a correction to my question, but made a mistake. It should have been "2) Is it possible for the function to return a list
In examples in How-to, there are plenty of examples, but most examples return numeric/symbolic values, not list
Apply didn't made too much sense, Apply[f, {a,b,c}] - will shove the whole thing into f => f[a,b,c]. Effectively changing the head of {a,b,c} from List to f
Apply is useful in cases where you have a list like {{a,b}, {c,d}, ...} and you want to generate the list {f[a,b], f[c,d], ...}. In that case you could do Apply[f, {{a,b}, {c,d}, ...}, {1}] (or f @@@ {{a,b}, {c,d}, ...} for short)
@newprint Listable is an attribute, and attributes are given as the third argument of Function when you're defining a function. You can also do SetAttributes[f, Listable] to set this attribute on an already extant function.
@acl I'd probably use /@ Range[10] instead of Do but the principle is the same
@newprint In Mathematica you need to get rid of the idea that lists are special in any way. They are just expressions like everything else in Mathematica.
@Heike I tend to do the same (use Map) but I've noticed that I can read and understand my stuff better if I avoid nesting too many pure functions, Maps etc. so I consciously try to use Do, Table etc wherever it makes no speed difference
How can one reference an anchor in the (online) Documentation Center? I know how to embed a link for e.g. StreamPlot, but how can one link directly to the StreamStyle option under the Options section on the same page? Can this anchor-link be extracted from the documentation from under Mathematica...