Questions tagged [function]
The function tag has no usage guidance.
57
questions
1
vote
0
answers
41
views
How can I insert pictures into a graph using asymptote? [closed]
How can I insert pictures into a graph using asymptote? Below is an example picture.
0
votes
1
answer
44
views
make negative values of the function disappear below the y-axis
I want the negative values of the function, that is, those values which are below the $|u|_{L^\infty(B)}$ axis to disappear or take value zero. I have tried some options which have been asked in ...
3
votes
3
answers
155
views
Pgfplots calculates plot wrongly
I am getting crazy about the following problem: A straight line y=0 should be plotted, but a function with a negative slope is plotted:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}...
1
vote
2
answers
45
views
Modification for use of dnaseq package
I need to write a dna sequence in my work so I was looking for a package or a way to achieve that. I found the package dnaseq but it seemed to me that I didn't have everything I needed, then I found ...
1
vote
1
answer
29
views
Error building a table row from comma separated list when using listofitems package
I am trying to build a table in which a row is built by a function/command call. I can get everything to work if I pass each cell as a separate argument to the command, but that is going to be tedious ...
0
votes
1
answer
49
views
what can be the code of this series which takes 3 values [duplicate]
I am typing my masters thesis in LaTeX and I am unable to write the code of this product which breaks into three different values
So, Sum $S$ breaks into
I know the code of $n$ Choose $k$ and $\...
0
votes
0
answers
29
views
Using TikZ to Plot the Fourier Transform with Magnitude and Argument Coloring
I would like to use TikZ to draw the function graph of the Fourier transform
𝐹(𝜔) of 𝑒^𝑡 sin(𝑡)𝑢(𝑡). The x-axis represents 𝜔, the y-axis represents the magnitude of 𝐹(𝜔), and different ...
2
votes
1
answer
70
views
Horizental gradient colored text with a function
I want to create this horizental gradient coloring for text
and here the code to do it for each letter but I want to have a function to do this. function should get text, and 2 colors. note it should ...
1
vote
2
answers
48
views
pass dimens or macros as parameters to a lua function
I have this Lua function:
-- ratio of dimensions
function ptLuaGetRatio(val1, val2)
local ratio = val1 / val2
tex.print(string.format("%0.5f", ratio))
end
In LuaTeX I want to call it ...
2
votes
1
answer
120
views
Is it possible to modify a \cs_new_protected:Nn function using hooks?
A user of one of my classes exceptionally wants to modify something that is hard-coded in a \cs_new_protected:Nn function. I can give her the means to redefine this function using \cs_set_protected:Nn ...
1
vote
1
answer
73
views
Fine tuning: TikZ, pgfplots and Lennard-Jones potential
I'm trying to recreate a faithful copy of the graph shown here.
I'm trying and trying again, but I would like to make the curve tend to infinity more quickly for x=0 and tend to 0 more quickly for x=...
1
vote
1
answer
77
views
Adding an arrow to the graph of a function
I'm making a thermodynamics PV graph to show how a cycle progresses and ideally I'd need to add arrows going along the blue line going left, the red going right and the green going up. But I cannot, ...
0
votes
0
answers
36
views
How can I add a 2nd picture on my cover page and have it slightly overlap the first?
I have been using and adapting my university's Latex template for a year now. I mostly manage by snooping around the code and reading the commented code. So far I've managed to adapt some shapes, ...
0
votes
1
answer
55
views
Plotting a PV function graph
I'm trying to plot the following graph in LaTeX, but I cannot, for the life of me, find mathematical functions that work.
This is my code and the following image is what I'm trying to achieve:
\...
0
votes
1
answer
45
views
Soft clip not working for shaded areas beween curves
I've been trying to find a way to shade the area between the curves, but when I try coding in LaTeX with softclip, everything shuts down. I don't know what to do.
This is my code :
\documentclass[tikz,...
-1
votes
1
answer
78
views
Plot the graph of sin-cos functions using PSTricks [duplicate]
I have the following codes in Miktex+Texmaker using the configurations LaTeX+dvips+ps2pdf+View PDF:
The following first figure (fig:cosine-plot) appears clearly:
\begin{figure}[H]
\centering
\...
1
vote
1
answer
48
views
Omit border of a variation table using the tkz-tab package
Is there a way to omit the border lines in a sign and variation table of a function in the tkz-tab package?
My Code:
\begin{tikzpicture}
\tikzset{h style/.style = {fill=red!50}}
\tkzTabInit[lgt=1,...
1
vote
1
answer
71
views
Graphical representation of a function in a well-chosen orthonormal frame of reference
I want to create this exact picture in latex but I do not manage to find the code to do so....
This is my attempt:
\begin{tikzpicture}
\begin{axis}\[
axis lines=middle,
axis line style={-...
1
vote
0
answers
66
views
How do I write the value of a function to a file?
What is the best way to write function values to a file from a tikz/pgf point of view?
I've been using native TeX macros like \immediate\write\file, but maybe there's a way at the pgf level to do it ...
3
votes
0
answers
85
views
Creating a function to obtain a sign table with zeros and non-existence points
I created a code to obtain a sign table. I've already tried existing solutions but I don't like them. I've almost reached all my goals but and the table I obtained is the following:
This is a working ...
1
vote
1
answer
82
views
Trying to plot using tikz
as usual I feel stupid because I feel that it should be easy but... well here I am...
I want to plot this function using tikz : x/3.6 + (x^2)/155
So I tried this :
\documentclass{scrartcl}
\...
1
vote
1
answer
64
views
how can one plot an expression on pgfplots, which rounds a real number R to the nearest integer Z and computes a given series up to Z?
I have the following MWE:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\begin{figure}
\begin{tikzpicture}
\begin{axis}[%
xmin = 0, xmax = 1,
...
0
votes
1
answer
51
views
\tikzpicture vs. axis vs. \pgfmathdeclarefunction vs. \tikzmath vs. \tikzset vs. \def\func
we can declare a function in the tikzpicture options, in \axis option, in \pgfmathdeclarefunction, in \tikzmath, by using \tikzset, by using the \def\func, etc... That is confusing as hell (at least, ...
1
vote
1
answer
38
views
How to change \x in a function declaration and still plot it?
I can plot the following MWE
\documentclass[beamer,crop]{standalone}
\usepackage{times}
\usepackage{pgfplots}
\usepackage{physics}
\pgfplotsset{
nice_axis/.style={
xlabel={$f \cdot T_c$},
...
0
votes
1
answer
52
views
Colour command showing side effect upon subsequent text [duplicate]
I introduced colour to a QED command, but the colour has side effect on the text that follows it. I want the colour to be restricted to the symbol only.
\documentclass[a4paper,12pt]{article}
\...
-1
votes
2
answers
74
views
Plotting functions with tikz [closed]
I would like to be able to plot standard function in Tikz, for a document in LaTeX I'm writing.
So far, I tried and I used this piece of code
\begin{tikzpicture}
\draw[->] (-5, 0) -- (5, 0) node[...
0
votes
0
answers
57
views
Blank lines between code sections [duplicate]
Have seen that strange things start to happen as soon as one introduces blank lines between
code sections.
For instance, take the synopsis for \NewDocumentEnvironment
\NewDocumentEnvironment{<...
0
votes
1
answer
79
views
Generating variants
Does the following command just add an additional name for the function ? Would the arguments be identical to the original function ?
\cs_generate_variant:Nn \feuds_newteorema_simple:nn { VV }
0
votes
1
answer
135
views
Defining new functions using parameter text and using the signature [closed]
Have been reading the expl3 document interfaces3.pdf to understand how to declare and use functions. Although I have understood that there are three main methods (new, set, gset) where each method ...
0
votes
1
answer
422
views
Defining functions
In LaTeX, one can declare functions in documents using the \newcommand or \newenvironment commands. Here's how one can define a simple function and an environment.
\newcommand{\myfunction}[2]{...
2
votes
1
answer
149
views
Protected Restriction
Have seen
\cs_new_protected:Nn \feuds_newteorema_define:nn
Is this just a definition of a function named \feuds_newteorema_define (taking two arguments as far as I can tell), Or is it something else ?...
1
vote
1
answer
97
views
Defining functions in Latex3
Could I have some explanation. For instance, What are these Nn and nn about. Very cryptic syntax.
\cs_new_protected:Nn \piston_newteorema_define:nn
{
\NewDocumentEnvironment { #1 } {D(){#2}}
...
-1
votes
2
answers
83
views
How to draw long aligned arrows like this when defining functions?
I think it must be some special environments, but I can’t find it. This system also works on longer sequences, so I guess it might be dependent on some diagrams-drawer just like tikz
This could be ...
2
votes
2
answers
118
views
Fill between f(y) and f(x) functions
I want to fill the area between an f(x) functions and an f(y) function. This is what I have so far:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz,bm}
\usepackage{...
7
votes
1
answer
129
views
Passing integer expl3 variables to a Lua function (via \lua_new:e)?
Given the following MWE:
\documentclass{minimal}
\ExplSyntaxOn
\int_new:N\g_test_myint_int
\int_set:Nn\g_test_myint_int{2}
\cs_set:Npn\__test_dostuff: {
\lua_now:e{tex.sprint(1)} % Works just ...
3
votes
1
answer
55
views
How to draw a function on a section of a plot
I want to draw the blue "Gaussian" (approximated using sinc) on the black line going through the bullet point exactly like how it rests on the actual axis with its center above the bullet ...
1
vote
0
answers
37
views
figure TIKZ with a parition of a rectangle [duplicate]
I wanna create a standalone tikz file of :
It is a partition into sets with smooth boundary and each set has a color either red or green.
This is what I ve done so far (with circles):
\begin{...
0
votes
1
answer
91
views
Recursive function
I need to determine a nth derivate of a given function using the code below, inspired in the recursive function.
\documentclass[tikz,border=5mm]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{...
0
votes
1
answer
65
views
Translate curve horizontally
I drew this curve with pgfplots
\documentclass[12pt]{article}
\usepackage[margin=1.5cm,top=1cm,headheight=16pt,headsep=0.1in,heightrounded]{geometry}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\...
1
vote
1
answer
61
views
Problema in tikzmath with two outputs
I haver a MWE where I want to calculate a sum and the associated error, implemented in the funcion serieF.
How can I implement in the function to return two outputs, i.e., the variables \s and \e and ...
2
votes
1
answer
167
views
commenting out a single word from a line
I have not got any solution after a few try. In latex, how we can comment out a single word from a line. I mean for example
Hello %this is so on
it comments out this and the rest of the line as well. ...
-2
votes
2
answers
97
views
write mathematical definition of functions [closed]
Can someone help me write these 4 lines?
0
votes
0
answers
57
views
How do I make the brackets $\{\}$ appear automatically in a function that I personally defined?
I'm currently writing a big paper and I defined a lot of function to save time, most function are in the math mode (I don't really know if that's important).
My question, that while using overleaf, ...
2
votes
0
answers
80
views
Graph of a log function using TikZ/pgfplots package with a vertical slope is missing data [duplicate]
I have a problem using the TikZ/pgfplots package in LaTeX.
I need to graph a function like this:
$y=-\log_{10} (0.5\cdot (-x+\sqrt{x^2+4 \cdot 10^{-14}})$
And I have been using this code without ...
0
votes
1
answer
79
views
expl3 / setlength not working in preamble with expl3
I am writing a package that should output typographic sizes. For example the absolute character height, the x height, average character width,...
These should be available in the preamble.
\...
2
votes
1
answer
272
views
Function model in LaTeX
I want to make a simple function model like in the picture. How would I do that? The docs of tikz-uml don't really help in this case.
2
votes
2
answers
112
views
expl3 / set length to average charwidth
I have a function that calculates the average character width. The function calculates the width as expected, but I can't use it in setlength.
I've tried around and tried solutions I've googled, but I ...
2
votes
1
answer
148
views
figure TIKZ with a trajecotry visiting regions
I want to create the following figure with tikz with a green backgroud.
This is what I ve done so far (with circles)
\begin{tikzpicture}
\draw (-4,-1) rectangle (4,4); % E
\draw (0,0) ++(45:2) circle ...
1
vote
1
answer
98
views
Plotting saw-tooth functions with varying heights
I am preparing a note on example of an everywhere continuous nowhere differentiable function. The construction involves a saw-tooth function, viz., h in the following way:
I want to plot the ...
0
votes
1
answer
162
views
How to type "function space" in Latex
In learning basic function space ,I met some special symbols. They are not \mathcal,\mathscr.
I'v tried to search special greek symbols or math symbols but failed.