New answers tagged

5

Use the two-argument form of First: listOfKeys = {"Ambientalismo", "Anoressia", "blahblah"}; list3 =First[#, Missing["NotFound"]]&/@ (WikidataSearch /@ listOfKeys) DeleteMissing[list3] Update: Re "just to understand why my attempt are not working" and "if I have a list with {1, "anoressia&...


15

Overview (tl;dr) Ultimately, the difference here is due to Module being lexically scoped, while Block is dynamically scoped. Lexically scoped constructs like With, RuleDelayed, and Function are handled differently, since they (by definition) deal with the literal syntax of the expression, not (just) the state of variables involved in it like Block does. In ...


3

I want to output only the x solution and replace it with the variable "x". I am not sure what you mean by this. Do you want only the x solutions in list as numbers and assign this list to x? or something else? Clear["Global`*"] root[a_Integer, b_Integer, x_Symbol, y_Symbol] := FindRoot[{a x + b y == 0, a x - b y == 4}, {x, 0}, {y, 0}] ...


Top 50 recent answers are included