Questions tagged [input]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
33 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 ...
2
votes
0answers
32 views

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

What exactly do \> and \< do in Mathematica strings (e.g. "ab\>c")? They ...
1
vote
0answers
21 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 ...
1
vote
1answer
68 views

export and import of 3D arrays

I have a very large (up to 1 Mio elements) 3D array A = {{{1,2,3,4},{5,6,7,8}},{{9,10,11,12},{13,14,15,16}}, ......, {{....},{....},{....}}} which I want to Export ...
2
votes
0answers
41 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, ...
2
votes
1answer
39 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: ...
1
vote
1answer
50 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 ...
1
vote
0answers
38 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 ...
1
vote
1answer
36 views
2
votes
2answers
101 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 ...
2
votes
1answer
49 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 ...
4
votes
1answer
174 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 ...
5
votes
1answer
98 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 ...
0
votes
0answers
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} ...
0
votes
1answer
74 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 ...
3
votes
1answer
100 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 ...
5
votes
2answers
86 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!
2
votes
1answer
73 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 ...
2
votes
1answer
174 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 ...
-1
votes
1answer
79 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 ...
7
votes
2answers
270 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})$...
1
vote
1answer
53 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 ...
16
votes
1answer
188 views

How can I view the minimal required arguments of a Wolfram Language function?

This question might be a bit of an overstretch, or really obvious, but I haven't been able to find an answer yet. Is there a way to automatically view the minimum required arguments for a WL function?...
3
votes
1answer
66 views

Inconsistent behaviour using string with superscript as label

This might be a silly question, but actually I lost a bit of time to figure out what I was doing wrong and now I want to understand better. Moreover, I'm not sure if the behaviour I see is a bug or ...
3
votes
2answers
112 views

Colour panel upon condition of an input field

I have something like a "mortgage calculator", and I now want to colour the panel depending on the inputs that the user has made in my input fields. This would be the code: ...
8
votes
1answer
271 views

How use Iconize object assigned to a variable (Mathematica 11.3)?

In Mathematica 11.3 we have the new Iconize function. Say I create an iconized image grabbed from the web, like this: ...
1
vote
1answer
88 views

Need input control for manipulate allowing custom data

I am working on an a Ray Tracer for optical lens. Currently my code takes in a list of lens data: ...
2
votes
0answers
69 views

How to represent arbitrarily dimensioned vectors in mathematica?

I've seen here that vectors in Mathematica can be represented as lists. I was recently trying to do the computation Solve[(a + (x-1)*b).b==0, x] where a and b are ...
2
votes
1answer
66 views

Input without dialog

I'm programming a game, similar to a Sudoku in the sense that you have to put numbers in a grid. When Sudoku is played in a computer, (for instance, in https://www.chiark.greenend.org.uk/~sgtatham/...
3
votes
2answers
73 views

How to see the definition of `In[n_]` for some `n`? [duplicate]

After running the code In[1]:= a = 2; In[2]:= ++a Out[2]= 3 if In[2] is evaluated repeatedly, ...
0
votes
0answers
43 views

Is there a way to reverse inline control to normal expression?

We can use Shift+Ctrl+Enter to convert an expression to inline control, as stated in here. But how to reverse that effect? Edit As Alexei Boulbitch suggested, ...
0
votes
0answers
186 views

Creating a dialog window

I would like to create a dialog like the one in the picture: where by default: the content of $x_1$, $y_1$, $F_{x1}$, $F_{x2}$, $M_{z1}$ is $0$; the content of $\theta_{e1}$ is disabled; the tips ...
3
votes
2answers
132 views

How to remove quotation marks from InputString?

I want to make a script for solving liniar equations (in Mathematica) with something like: Solve[{InputString["Solving Linear Equations"]}] The output is similar ...
1
vote
2answers
83 views

2D input for partial derivative

If I input D[f[x,y],x] the output is $f^{(1,0)}[x,y]$. If I copy and paste this output then it works as an input as expected. However, if I manually type the ...
7
votes
1answer
1k views

How can I get 'KeyDown' without writing 26 commands?

EventHandler and {"KeyDown","x"} work for registering a specific letter. Is there a direct way to return whichever letter keys ...
1
vote
1answer
146 views

I want to pause execution until input is submitted without using Ask or

I am developing a Yahtzee-type PC game. I would like the program to pause execution until the player has selected one, two, or all three checkboxes and clicked on "Clicked when done." (See below.) ...
3
votes
2answers
100 views

Apply a style to a selected structure

If I type out, in my notes, a series of transformations, I often like to convert the very last step to a Framed equation: I'm currently doing this by: selecting ...
1
vote
0answers
62 views

InputAutoReplacement inside an Inline Cell

I use InputAutoReplacements to speed up my textual writing. Consider the code below. ...
1
vote
1answer
52 views

How to write a code for user defined list

I want to make a 1 dimension list like {x[1],x[2],...} I want it to be filled by a user, maybe using Input[] function.
1
vote
1answer
108 views

File I/O: File is not encoded [closed]

I have a .wl file which should write a number to a .m file (using Put), and another .wl file that will later read that number back (using ...
1
vote
2answers
122 views

Multidimensional plot of output value over all possible combinations of input variables in mathematica

In Mathematica I have a self-defined function in Mathematica: outputval = myfunc[v1, v2, v3, v4, v5, v6, v7, v8, v9] When the function is called as above with ...
0
votes
1answer
98 views

How can I get an array of numbers from the user and show the numbers with formatting?

Suppose that I have to print the following lines: Number 1 is 5 Number 2 is 6 Number 3 is 7 Number 4 is 8 Number 5 is 9 Now, if I were programming in C, I would have run the following code : ...
4
votes
2answers
151 views

Base 12 input and output without ^^ or BaseForm

I would like to be able to enter numbers and have them interpreted in base 12 and output in base 12. For example, I want 13+A to produce ...
4
votes
1answer
435 views

How do I accept user input through keyboard?

In a user experiment, I wish to ask the user to rate images on a scale of 1 to 5. The user will be given instructions at the beginning of the experiment. On the screen, an image will be displayed and ...
17
votes
1answer
935 views

How do I remove the little × that shows up in the frontend when typing?

Version 11.1 now shows a little grayed out × (a multiplication sign) when one is editing something, to warn them that the expression will be interpreted as the ...
10
votes
1answer
214 views

Performance-driven approach to using Big Data without killing the hard-drive

Situation A calculation has to be done in which the amount of data is too much to fit into memory. Fortunately, only a part of the overall data set has to be known at a time. The preprocessing is ...
9
votes
1answer
429 views

How to paste formatted Mathematica code *verbatim* from external text editor to notebook?

In my text editor, Mathematica code may look like this: YMMV, of course, but I at least find this easy to read. If I copy that snippet of code and paste into a Mathematica notebook, it looks like ...
0
votes
1answer
200 views
1
vote
3answers
1k views

How do I make ListPlot join the points in order? [closed]

I gave ListPlot a set of points to plot and join together. The problem is that It's drawing the line in some way other than the order that I input them as. ...
0
votes
1answer
152 views

Using Rotation Matrix Data Applied to a Cube: Visualization

I've written a program that calculates the rotation matrices of a cube over time. The program outputs the matrices to a data file in the form of a series of Mathematica styled matrices (i.e. {{a11,a12,...