Questions tagged [input]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
93 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...
user avatar
2 votes
1 answer
126 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. ...
user avatar
4 votes
0 answers
31 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,...
user avatar
  • 2,688
0 votes
2 answers
98 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 ...
user avatar
  • 1
2 votes
1 answer
143 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 ...
user avatar
0 votes
0 answers
30 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?
user avatar
  • 91
0 votes
0 answers
33 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
60 views

Have Button fire with both Kernel and FrontEnd

Here's some code which, when evaluated, types an expression in the cell below it: ...
user avatar
  • 2,688
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 ...
user avatar
6 votes
1 answer
309 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 ...
user avatar
  • 383
1 vote
2 answers
79 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((...
user avatar
  • 2,688
1 vote
2 answers
100 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 ...
user avatar
1 vote
2 answers
65 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 ...
user avatar
2 votes
3 answers
535 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: ...
user avatar
11 votes
1 answer
382 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. ...
user avatar
  • 403
1 vote
1 answer
86 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 ...
user avatar
  • 11
1 vote
1 answer
109 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} ...
user avatar
  • 6,124
1 vote
0 answers
50 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: ...
user avatar
6 votes
1 answer
60 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 ...
user avatar
  • 2,815
0 votes
0 answers
37 views

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

how do I stop the "=" symbol from creating "WolframAlphsShort."
user avatar
3 votes
3 answers
249 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,...
user avatar
1 vote
0 answers
102 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 ...
user avatar
  • 2,751
0 votes
0 answers
48 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, ...
user avatar
  • 43
2 votes
4 answers
381 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
71 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_\...
user avatar
2 votes
0 answers
66 views

How to read input stream with no newlines?

I have a script named stdout.wl: ...
user avatar
2 votes
1 answer
103 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 ...
user avatar
1 vote
1 answer
28 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 ...
user avatar
0 votes
2 answers
75 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 ...
user avatar
  • 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 ...
user avatar
  • 1,649
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 ...
user avatar
  • 8,178
2 votes
0 answers
40 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 ...
user avatar
  • 8,178
2 votes
0 answers
42 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, ...
user avatar
  • 6,912
2 votes
1 answer
57 views

Assign variable array as function input and generate slider inputs for Manipulate

New to Mathematica. I want to be able to input some parameters, do some calculations, and end up with some output in a functional form such as: ...
user avatar
  • 23
1 vote
1 answer
183 views

How to ask the user via Input a Function? - Wolfram Mathematica

I need to ask the user the function to make some procedures. For example, instead of having at the code f[x_] := Sqrt[1 + x]; and then ...
user avatar
1 vote
0 answers
158 views

How to restrict the type of input given to the function Input[]?

The function Input[] when evaluated displays a dialog box where one can enter any character. My question is how do I restrict the input only to a certain type such ...
user avatar
  • 483
1 vote
1 answer
38 views

How can I get a list of 25 numbers from user with formatting ..."please enter a[1]=","please enter a[2]=",

Do[Input["please enter a[",i,"]"],{i,1,25}];
user avatar
2 votes
2 answers
353 views

Convert string of tuple of numbers to complex number

I am reading complex number from a file which gives me a list like that ...
user avatar
2 votes
1 answer
51 views

Code not working when I'm breaking it up into different lines

The following code works perfectly For[i=1,i<4,i++,Print[i]] However, when I break this into different lines, it stops working. Moreover, the braces appear to ...
user avatar
4 votes
1 answer
540 views

What's the proper way to do percent multiplication in Mathematica? [closed]

I'm very new to Mathematica and I want to calculate percent multiplications. See below image. In In[3], I pressed space after 50% and then pressed 80%. Mathematica ...
user avatar
6 votes
1 answer
177 views

How do I reliably read from stdin using wolframscript?

I am trying to direct a stream of data to a wls script in a command line environment. Wolframscript provides the ...
user avatar
  • 318
0 votes
0 answers
42 views

How to convert {x -> 4} to simply 4? [duplicate]

I am using the Solve function to obtain two solutions for a quadratic, then I want to use those two solutions as input for something else but I can't because they are in the form of (x->number} ...
user avatar
  • 1
0 votes
1 answer
95 views

Advanced Dynamic Input

Note: I have corrected this question to fix an error in my understanding of RealExponent (which I have now removed). Suppose that I have a bunch of parameters that I want to set interactively using ...
user avatar
  • 2,219
3 votes
1 answer
137 views

Looking for alternative to programmatically-generated palette

Short version of the question: Is there a way to have an escape-sequence alias (or user-defined keyboard shortcut) pop up a dialog box or other type of input structure allowing the selection of a ...
user avatar
  • 2,219
5 votes
2 answers
101 views

Sub-subscripts in strings cause different spacings than subscripts

Spacing around subscripts within strings seems to work well: But the spacing around sub-subscripts does not: I did not manually add that space after the 2. How can this be fixed? Thanks!
user avatar
  • 2,219
2 votes
1 answer
103 views

Define Macros to automatically change keyboard input

When using Solve for example, I find myself having to use it in conjunction with other types of functions, like Flatten or ...
user avatar
  • 1,043
2 votes
1 answer
497 views

Is it possible to enter tabular data in Mathematica? [duplicate]

I want to enter table of X and Y values then plot them. I don't want to enter brackets and or commas. Can I prepare grid for myself and them fill it with data in Mathematica, like in Excel? I found ...
user avatar
  • 725
-1 votes
1 answer
97 views

Different variables for same equation [closed]

a = {25.0,32.0}; k = {100.0,28.0}; P = (1.92*a^(2/3) - 0.02 + 0.8*k^(-3/4)); In the second equation (which is P) I want to use a1=25 and k1=100 firstly after ...
user avatar
  • 13
7 votes
2 answers
307 views

Mixed fraction input

How do I make mathematica treat $5\frac{1}{2}$ as a mixed fraction rather than 5 times one-half? I'm using typesetting keyboard shortcuts (if that's important) Currently I'm using $(5 + \frac{1}{2})$...
user avatar
1 vote
1 answer
64 views

Use FormPage to define a variable for later use

I want to be able to use FormPage (or FormFunction) to be able to create an Association List for later use in a notebook. This ...
user avatar
  • 1,683