0
votes
0answers
37 views

A problem with functions and Infinite expression 1/0 encountering

Following code (function) makes integrals and then replace f[x] with Cos functions and calculate the definite parametric ...
0
votes
1answer
74 views

A problem with set values

The following code is just an example to clearly explain my problem. Assume that : ...
1
vote
1answer
101 views

How to replace a list with the result list after each iteration [closed]

I have some initial values such as L1 list: L1={10,20,30,40,50}; I want to use the L1 ...
0
votes
1answer
41 views

How to put some values from a list into a function in a Do loop

I want to program a code in MATHEMATICA in order to calculate some values in different iteration. For example, assume this list: list={1,2,3,4,5} Now assume that ...
0
votes
1answer
80 views

Working with functions

I am required to write a function that takes a function as a parameter. ...
1
vote
2answers
133 views
18
votes
2answers
245 views

Plotting a defined function gives different results from plotting the function directly

Consider the following piece of code: function[t_]:=Exp[-9 t^2]; LogLogPlot[{function[t],Exp[-9 t^2]},{t,.01,100}] I expect the two plots to exactly overlap each ...
1
vote
1answer
86 views

Cannot Plot Output of Solve

I'm trying to plot the output of the following function t2[x_] in ...
1
vote
1answer
575 views
3
votes
2answers
427 views

Ways to plot interpolating functions more economically?

I am interpolating a lot of data over geographic coordinates obtained via GPS, and frequently I need to plot these interpolated functions together. For example, I may have an interpolated elevation ...
7
votes
7answers
568 views

Can my color function be written more simply?

The code shown below works well, but I think the pure function I'm supplying to the ColorFunction option could be more elegant. How can I simplify it? ...
1
vote
1answer
92 views

How do I define a function that, when given a list of parameters, plots a family of functions?

So far I've got this: draw[a_, b_] := Plot[{f[a, b[[1]], x], f[a, b[[2]], x]}, {x, 0, 5}] The function draw will be used like ...
8
votes
2answers
243 views

Manipulating OptionsPatterns[]

How do you combine OptionsPatterns? For example, I would like to have a function that can take both options that I specify, and options for all graphs: ...
11
votes
2answers
561 views

How to plot a barycentric line

I want to plot a barycentric function on an equilateral triangle (ternary plot). For example f1 = {Abs[Sin[x]], Mod[x, 2], Abs[Cos[x]]}; At the moment I evaluate ...