Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions on expression testing and manipulation through pattern matching and constructing efficient patterns.
1
vote
0
answers
97
views
Check whether the argument of a function is a matrix with numerical values
I know that
MatrixQ[expr,NumericQ]
tells whether expr is a matrix with numerical values or not.
How do I implement such a check for an argument of a function?
func[matr_?WhatShouldIWriteHere]:=Mo …
9
votes
Using Cases for lists containing Rule ( -> )
HoldPattern[] solves the problem!
Cases[list, HoldPattern[_ -> 0]]
8
votes
1
answer
459
views
Using Cases for lists containing Rule ( -> ) [duplicate]
I am trying to extract an expression of given pattern from the list of the form
list = {a -> b, c -> d} (* typical output of Solve *)
For example, all the expressions which look like x -> 0.
For o …