603 views

### Modifying parameters: Set::setps in the part assignment is not a symbol [duplicate]

Ok, this will probably be a silly question, but I can't get my head around it. I'm making a simple module that, given a list and two integers, will swap the position of the elements in the list.(...
236 views

### On reimplementing the Select function [duplicate]

I am working through the course Programming Paradigms via Mathematica. One of the exercises asks that you construct a function that mimics Select,even with three ...
118 views

### Sorting and keeping the main format of list numbers [duplicate]

I have a list with these elements: list={1/2 (1 + Sqrt[5]), 1, 1, 1/2 (1 - Sqrt[5]), 0}; I want to sort them with ...
129 views

### ImageData reverses the order of the row of an Image [duplicate]

Could someone convince me what is the utility of doing a function like ImageData that reverses the order of rows in an image? Why was it coded like this? Why does ...
784 views

### How to define a function based on the output of DSolve? [duplicate]

I would like to define a function based on the output of the following DSolve call: ...
468 views

### Find minimum value of function which calls NDsolve [duplicate]

I have defined a function which takes a coefficient for a differential equation as an argument, solves the differential equation with NDSolve, and returns the value of the solution at time t=10. I can ...
127 views

### beginner's question: change a parameter while get variable answers [duplicate]

I'm new to Mathematica from R, since R is not quite good at dealing with the following problem. Say, i want to solve the function a x - 10 = 0. Each time I change the value of a, say, from 1 to 10 by ...
162 views

### Maximizing a function defined using NIntegrate [duplicate]

I have two functions fn[x,y,z] which is in integral form and I have another function gn[x,y] which is also in integral form ...
443 views

### Replace doesn't replace the denominator [duplicate]

I have the following expression in Mathematica -((E^(2 - 2 Sqrt[(x[1] - x[2])^2]) (x[1] - x[2]))/Sqrt[(x[1] - x[2])^2]) I want to replace anything of the ...
255 views

### Check if an inequality holds among the solutions returned by Solve [duplicate]

Let's say I solve a system: Solve[{a == 3* c, b == 2 *a}, {a, b}] and then want to see if the values found for a and ...
793 views

### “not a list of numbers” and “cannot be used for replacing ” [duplicate]

I am trying to plot a function which is based on the solution of some equation; I could get the correct figure but only after lots of warnings are printed out. The following is a minimum version of ...
660 views

### Fitting a Function With a Numerical Integral [duplicate]

I am having trouble using FindFit with the following function. ...
321 views

### Change input variable in a function [duplicate]

I'd like to write a function, that would take a matrix as an input parameter and would change it by multiplying one of its rows by a factor. I try to do it in the following way: ...