# Search results

1. ### Mathematica What is ___ vs _ in Mathematica ?

Hi guys , I have the next declaration in Mathematica : myfunc [lis_list] and myfync [x_,y___] what does "lis_list" means ? I know that when I want to declare a variable of a function I must write myfunc[SomeVar_] with one _ but what are 3 times _ (meaning ___) I hope...
2. ### Mathematica Functions in Mathematica - sort function

Hi , I'm trying to write down the following function : sort[list_] it needs to sort a list of numbers by checking each two adjacent numbers and swap them if it is needed , but it doesn't work . I need to implement it using Pattern Matching . but I don't understand how can I...
3. ### Mathematica A few questions in Mathematica

Hi , I'm trying to solve the following equation: e^x=x^3 + x^2 -1/4* x -4 using this code : NSolve[Exp[x] = x^3 + x^2 - 0.25 * x - 4, x] but it doesn't work . In addition I'm trying to solve it graphically by plotting the left and right functions simultaneously . but how ? with...
4. ### Mathematica Can someone please explain how to write functions in Wolfram Mathematica ?

I'm good in writing functions in Matlab , however since moving to Mathematica , I find it pretty hard to write them . For instance I need to write a function that returns a [1,0,-1] to integers, meaning x>0 , x==0 , x<0 with a single If , but I didn't find a way with one (only two)...
5. ### Mathematica Mathematica functions

Hi guys , I'm a little new with Mathematica and I'm trying to write down some functions. the first one is writing a functions that square the elements in a vector , recursively , using patterns . so , I tried this one : x = Range[1, 10]; sq[0,list_]=list^2; sq[sum_,list_] :=...