# Questions tagged [variable-definitions]

Questions on assigning and unassigning definitions to names that represent them, including issues raised by context and localization. Use tag [assignment] for issues relating to Set versus SetDelayed.

374 questions
Filter by
Sorted by
Tagged with
36 views

### Variables for multiple data files plotting using same Mathematica notebook

I am not an expert in mathematica, I have this following code. As you see I import a text file under the name "MyPoint1", plot with "pAll" then I do some more calculation with more variables and ...
64 views

### Defining list of new variables at once (in a loop?)

I have a list of solutions Subscript[x, 1][t], i = 1,...,n (n given). I would like to use these variables to define new variables such as: ...
27 views

### Assign dynamic string in a list to variables in functions

I have 2 lists: ...
62 views

### How to access all instances of a defined function

This should have a simple solution, but for some reason I cannot find how to do this. Let's say I have a "function" where I have defined values (in my actual example I have many instances of this, ...
30 views

### Series expansion of explicit functions

For the following input, zv[u_, v_] := v + zv1[ u, v]/u; mvu[u, v] := D[zv[u, v], u]; Series[mvu[u, v], {u, 0, 1}] the output is ...
71 views

### Basic Question: how should I read this instruction?

I'm very new at using Mathematica and it's not my Job. It's just something I like. ...
35 views

### unknown variable in a recursion relation

I have a code as follows ...
42 views

### Reversing the flow of the equation sign. Compacting an equation. Choosing which variables to show

Here's a simple example of what I'm trying to get at with that mysterious title. I start off with a Hermitian matrix that I derived analytically ...
20 views

### Properly defining and plotting a function that requires NSolve

I want to defined a function that solves some equation numerically: ...
72 views

### Variable substitution like usual maths

So... I'm trying to get some simplifications on equations using own defined variables, but the tries I gave didn't result on what I wanted. The problem: I have 2 variables defined as: ...
100 views

### Is there a way to use a subscript as variable? [duplicate]

I'm really new with Mathematica, and I could not find a previously question similar to this one. Is there a way that Mathematica can be made to recognize and treat a subscript letter as variable so ...
32 views

51 views

### Problem with defining a simple linear operator

I need to define a linear operator, which should have very simple linearity: myOp[Plus[f_, g_]] := myOp[f] + myOp[g] myOp[a_ f_[x_, t_]] := a myOp[f[x, t]] where ...
53 views

### How to define multivariable vector funtion? [closed]

I would like to define a function of variables having two components as $u(x,y) = (f(x,y),g(x,y))$. I defined such a function as u[x_, y_] := {f[x, y], g[x, y]} ...
415 views

### How can I make assignments persist across sessions?

Yesterday, I imported a large set of data into a Mathematica notebook and stored each imported list of numbers in a function. For example, I would map a list like ...
303 views

### Can one define 0 Log = 0?

With reference to this post, can one define 0 Log = 0 in Mathemtica?
116 views

### VectorDensityPlot, [closed]

I'm trying to plot the following function for two different values of variable m. However, it seems the second figure never appears. Weirdly, I noticed that real numbers are being attributed to ...
38 views

### How can you define a function with variables and put it equal to a function that is already defined? [closed]

Lets say you have a function: f = x^2 + y^2 Now I want to define a new function of x and ...
34 views

### Is there a difference between these two ways to define a function? [duplicate]

(I took this example from another question) f = 0; f[n_] := f[n] = DigitCount[n, 10, 1] + f[n - 1]; f I notice that this example defines f(n) in a ...
44 views

### Plotting a complicated function defined in terms of other defined quantities

Perhaps this question will be too broad or poorly asked since it is about some very simple problems and I apologize if that is the case. So, I'm just trying to plot the curve of a complicated and ...
20 views

### Seeing definitions of built-in functions [duplicate]

Possibly a very amateur question, so I'll apologise in advance. I'm reasonably new. I'm trying to write a Dot equivalent of ...
102 views

### Globally Defining a Variable that Depends on Arguments of Functions [duplicate]

I have many delayed-defined functions of many variables, and all the functions share a term containing some of these variables. Thus, I would like to just call the term ...
79 views

### Changing the values of variables throughout a notebook

I have a model with many parameters, and I'd like to see how the model changes when some of those parameters change. Right now many of those parameters are set to prescribed values, i.e., ...
41 views

### Factoring out a parameter

I have some function: f[a_,b_,c_]:=Sqrt[a^2+b^2+c^2] Is there a way that I can factor out parameter (variable) b like this: <...
41 views

### Relations between Function Variables in Computations

I have the relation λ=c/f, respectively f=c/λ and a simple function n[λ_]:=λ²+1. I'd like to differentiate the function with respect to f, then plot it as a function of λ again. For this, I can define ...
73 views

### How to define a variable to be a function of all the arguments but one?

I have several variables (coordinates) $x_1, x_2, x_3, x_4, z$ and a lot (21, to be precise) functions $g_i$ which are assumed to depend on $x_1, x_2,x_3, x_4$, but not on $z$. I also have a ...
47 views

### Why does LinearModelFit give me an equation in $z$ rather than $x$?

I am working on a Mathematica notebook and making graphs for my lab. I can't make a graph for my linearized data as LinearModelFit gives equation in ...
49 views

### Using both subscripted and non-subscripted variables in an equation

I'm getting started with Mathematica, as I have been using Maple in the past. Is it possible to define two variables $\alpha_1, \alpha_2$ and then still use $\alpha$ as a parameter of a function and, ...
51 views

### Question about ListPlot of variables [closed]

My question is trivial but I don't seem to be able to get the answer. Suppose that I do a numerical computation (division of some numbers that come from the numerical solution of an NDSolve or ...
88 views

### Get the name of symbol inside a function [duplicate]

I have a list t1Funcsv0={0.10000000000, 1.00000*10^-7} and I have a function ...