Questions tagged [input]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
2 answers
88 views

Bug of ChoiceDialog

I am using Mathematica 13.1 on Windows 11. I have the following bug with ChoiceDialog: ...
  • 5,112
0 votes
0 answers
45 views

How can I let each input show its number?

The problem I'm facing is that I want to know number of one input. For example, In[1]:= (...) then I know this is first input, but I found only the first input in a ...
3 votes
1 answer
77 views

How to select using input form?

Let us assume that we have the list with some names, say list = {"Name1","Name2","Name3"}; How to make a graphical interface allowing ...
  • 5,112
2 votes
2 answers
73 views

How to enter the input not directly in the code but in some interface sub-window? [closed]

I understand that the question is very basic, but I did not find the answer. Consider the parameters parameter1="value"; parameter2 = 13; Normally, these ...
  • 5,112
0 votes
0 answers
18 views

How to print output within an input block? [duplicate]

I would like to print data within a signle input block in a way something like this: ...
  • 1
0 votes
0 answers
24 views

Need a second click to use a palette

If I load the palette BasicTypesetting in a fresh kernel (Mathematica v12.2, Windows11) I observe flickering in the botten right corner of the palette window. If I choose an element of the palette by ...
0 votes
1 answer
52 views

Error when trying to do TeX input with ImportString[]

I got this information from here (Last line of the details section): https://reference.wolfram.com/language/ref/menuitem/InlineTeXInput.html My code: ...
  • 1,057
0 votes
0 answers
47 views

Input Assistant screen location issue

I most often run a THREE monitor configuration from a Dell laptop. When I am editing a notebook on the monitor identified as #3 by Windows 11, the Autocomplete suggestions and other popups like ...
  • 425
0 votes
0 answers
46 views

Changing permutation dynamically

I am trying to make a visualization of permutation as a graph. With the first compilation of program I want to get random permutation and then be able to dynamically change permutation that I desire ...
  • 21
2 votes
1 answer
54 views

Why does the console REPL parse input differently from ToExpression?

In the console REPL, we can see that input is parsed in a certain way, that is not equivalent to simply calling ToExpression on the input string. From math.exe using Mathematica 13.1: ...
0 votes
1 answer
52 views

FormFunction and Program Input

I am trying to run a little program on the cloud where users have to supply some input - numbers. I wrote enter code here formShort = FormFunction[ FormObject[{{&...
  • 31
1 vote
2 answers
83 views

A bug in InputField of type Expression?

I have a problem with a simple InputField of type Expression: ...
0 votes
0 answers
63 views

READKEY: Big claims on an old problem

In my old BORLAND PASCAL DOS, I often used keyboard commands in the form of an infinite loop, interrupted when reading some keys: ...
0 votes
1 answer
54 views

Is there a simple method to export an input cell? [duplicate]

This is a code of an input cell: a = 1 + 5*8; b = {6, 99}; Entity["MathWorld", "FunctionGraph"] Plot[x, {x, First[b], Last[b]}] I hope to get a ...
  • 25.3k
4 votes
1 answer
142 views

How to convert any string of code to an input cell?

This is a generalization of this question, which already has very nice answers. Suppose str is a string of valid code, so that ...
  • 802
2 votes
2 answers
263 views

How to generate input cells whose code is determined dynamically?

Following this post, I want to use code to generate an input cell with new code. However, unlike the linked post, I want my code to dynamically determine the new code to be printed in the input cell. ...
  • 802
5 votes
0 answers
111 views

Characters and prompt are offset when typing in a text cell using MM13.1

I noticed on my system (Windows 10 and MM13.1) that when I create a text cell (ALT 7) the longer my sentence is the more offset the cursor appears from where I am. When using the left arrow to go back ...
  • 3,740
1 vote
0 answers
96 views

Mathematica can not interpret parentheses correctly [closed]

I want to sum up four terms but Mathematica does not interpret the parentheses correctly. In the picture, in second line there is only one term that starts with 1/12...
2 votes
1 answer
177 views

Stop Mathematica’s automatic indentation on existing notebooks

This question relates to Mathematica 12.3 (and possibly many other versions). Mathematica's automatic indentation does not conform to my workflow. From the very old days of Mathematica 1.2, i.e. ...
4 votes
0 answers
36 views

Sequence in superscript

The code DisplayForm@SuperscriptBox[a,b,c] makes a invalid box. It still renders like $a^b$, but it's red with an error message (as it should be). That being said,...
  • 3,206
0 votes
2 answers
134 views

How to plot functions from user input?

Manipulate[g[x_] = f; Plot[{g[x], g[2]}, {x, -9, 9}], {{f, "Enter a function...", "f(x) ="}}] Hi, I'm relatively new to Mathematica and this ...
  • 1
2 votes
1 answer
156 views

How to construct this Matrix

A $4\times 4$ identity matrix $\mathbb{I}$ can be written as $\mathbb I=\delta_{ij}\delta_{kl}$. To construct this matrix, I wrote ...
1 vote
1 answer
76 views

Style changes to Text while I want to be Input

I do know what happened to my Mathematica. I frequently have to change the style from Text to Input to write codes. How I can re-change this unwanted issue?
  • 111
0 votes
0 answers
38 views

Inputting a data file into a module

I'm currently writing a module that converts a data source into a distance matrix. So far, the code I have works: ...
user avatar
3 votes
1 answer
72 views

Have Button fire with both Kernel and FrontEnd

Here's some code which, when evaluated, types an expression in the cell below it: ...
  • 3,206
2 votes
0 answers
39 views

Is there any function I can use to delete the cell automatically but at the same time keep the evaluated results

For, example, in the following code ...
6 votes
1 answer
321 views

How can I self-define a keyboard entry for 3-dot "Because"?

In Mathematica, there already exists a keyboard entry for 3-dot "Therefore", which provides great convenience for input as shown below. However, I find it a little odd that for its ...
  • 453
1 vote
2 answers
92 views

Control size of extensible parentheses and bracket

Consider \!\(\*SuperscriptBox[f,0]\)((a,b]). I would want that typeset something like $$f^0((a,b])$$ or maybe $$f^0\Big((a,b]\Big)$$ Instead it formats like $$f^0((...
  • 3,206
1 vote
2 answers
138 views

How to make an interactive calculator for any mathematical relation? [closed]

I am wondering if there is a way to make a calculator for any relation that is interactive. First, I choose a relation with some variables in it. The user will input a value for all of the variables ...
1 vote
2 answers
68 views

Problem when reading a small number as a LaTeX input

I've got a String variable defined as b="4.0 \cdot 10^{-5}", which is clearly written as LaTeX input. The problem is that when I want to obtain the ...
3 votes
3 answers
908 views

Read sympy expression in .txt file as Mathematica input

I have a Python file that has a variable defined using sympy. For instance, let us take the following (crazy) example that I could have eventually since I am automatizing a routine: ...
12 votes
1 answer
405 views

Input automatic replacement not working in 12.3 or 12.3.1

After installing Mathematica 12.3 (and now with 12.3.1) in Windows 10, the default automatic replacements like "->", ">=", "!=", etc. stop working. ...
  • 413
1 vote
1 answer
322 views

How to enter multiple inputs into a function? [closed]

I'm sorry for asking such an elementary question but I started learning the Mathematica language just yesterday and I can't seem to find an answer anywhere else. I'm trying to calculate the change in ...
  • 11
1 vote
1 answer
119 views

How to write this tensor?

How can I write this tensor in Mathematica? $$\mathcal{P}_{ijkl}(N) = \Big( \delta_{ik} - N_iN_k \Big) \Big( \delta_{jl} - N_jN_l \Big) - \dfrac{1}{2} \Big( \delta_{ij} - N_iN_j \Big)\Big( \delta_{kl} ...
  • 6,266
1 vote
0 answers
56 views

Strange behavior of typing a vector

When I input a complex 4-component vector, the mathematica throws an error: After then, I obtained the InputForm of the errorneous result as follows: ...
  • 1,009
6 votes
1 answer
67 views

Automatically set x=0, after each input/output ? ($AfterEachInputOutput)

Is it possible to do something that I want, after each input/output automatically and silently? I am looking for a feature like $AfterEachInputOutput in the following code : Example : to set variable ...
  • 3,539
0 votes
0 answers
40 views

how do i stop the "=" symbol from creating "WolframAlphsShort" [duplicate]

how do I stop the "=" symbol from creating "WolframAlphsShort."
3 votes
3 answers
348 views

How to plot an array of lines?

I have the data stored in the textfile like this: 0.5 0.5 -0.7 -0.8 0.51 0.51 -0.75 -0.85 0.6 0.1 0.1 1.00 and so on 4 numbers in each row. Two first numbers means coordinates (x0,y0), two last - (x1,...
1 vote
0 answers
125 views

Why in Mathematica and Wolfram Engine the result of this code is different?

f[x_] := Evaluate[Input["Enter a function to sum or integrate:"]] Print[f[t]] After starting, I enter x^2. Mathematica outputs $t^2$ while Wolfram Engine ...
  • 3,399
0 votes
0 answers
52 views

Import Accuracy/General Accuracy

r[i] = SetPrecision[ Import[epath, {"Data", epath2, 9 + counts + 5*i - 2, excelfile2}], prec]; epath is file name, epath2 is tab, count is row, ...
  • 43
2 votes
4 answers
438 views

How can we make the input of a function multiple lists?

I want to create a function that takes inputs that are multiple lists of ordered quadruples. For example, when we run the code our input line should read something like inputs[{2,3,4,5},{6,7,8,9},...} ...
user avatar
0 votes
1 answer
79 views

Entering complicated differential equation in mathematica

I am trying to enter a differential equation in mathematica. Example of such an equation is $$\bigg[\bigg(\frac{\partial{}}{\partial{t}}+\omega_\eta\bigg)\left(\frac{\partial{}}{\partial{t}}+\omega_\...
2 votes
0 answers
74 views

How to read input stream with no newlines?

I have a script named stdout.wl: ...
2 votes
1 answer
109 views

Inconsistent Reading of shell command results

Summary: The results of a grep command on fixed text files SHOULD be extremely repeatable, but by the time they arrive in Mathematica they are not. When rapidly ...
1 vote
1 answer
31 views

ReadList nondeterministic (iCloud issue?)

ReadList returns different results on different runs. A program that uses ReadList to read about 1000 text files in sequence is run repeatedly. Each file is opened, read and closed multiple times in ...
0 votes
2 answers
78 views

How to put an equation into an input prompt

I would like to know how I could put an equation into an input prompt displaying this equation in traditional form. Better an example: My objective is that the input box displays the equation instead ...
  • 31
1 vote
1 answer
39 views

How to have a common input for different nb file

I have a set of five files. Each file takes a common input. But I need to change the input and run the files. The output of some file are used in other files. So how to do this. And also is there any ...
  • 1,679
2 votes
0 answers
33 views

What's going on with \> and \< in strings? [duplicate]

What exactly do \> and \< do in Mathematica strings (e.g. "ab\>c")? They ...
  • 8,775
2 votes
0 answers
43 views

How do I introduce new input tokens to Mathematica (so that they can be recognized by InputAutoReplacements)?

I'm trying to introduce automatic replacements by modifying my notebook's value of InputAutoReplacements (e.g. via ...
  • 8,775
2 votes
0 answers
47 views

Why do comments sometimes become Null instead of being removed completely?

Consider the following definition: Piecewise[{{(*comment*)-1, x > 0}, {0, True}}] This is interpreted as intended, with the comment being simply removed, ...
  • 7,072