Questions tagged [subscript]

A subscript is a number, figure, symbol, or indicator that is smaller than the normal line of type and is set slightly below the baseline.

Subscripts are common in mathematical notation (generally indicating position, such as the index of a variable in a vector) and chemistry formulas (e.g. H2O).

Subscript and superscript (Wikipedia)

625 questions
0
votes
3 answers

How to overload the "[][] operator" in a constant array?

been stuck at this for a while. I have a mathlibrary with a 3x3 matrix class. It used to be dynamic , using a pointer and allocating memory of creation. But as its always gonna be 3x3 I decided to change it, but now I cant use [][] to get values of…
Patrik Nyman
  • 73
  • 2
  • 11
0
votes
1 answer

Referring to i values in Javascript for loops

I am new to Javascript and therefore have a simple question. I am trying to programme a for loop within which new variables can be created using the i value. How can I refer to i to change the variable names (without using an array)? In the example…
Amit
  • 1
  • 2
0
votes
1 answer

Fmax, Dmax. How do I put the "max" as a subscript?

In Python I am currently plotting some data and extracting the maximum values. now i want to have a label which looks like this: Fmax = ... and Dmax = ..., except for the max being a subscript, like "down". The label currently looks like…
0
votes
1 answer

Subscript in JLabel

I want to make my I in this JLabel have subscripts. Is this possible? for (int j = 0; j < col; j++) { gbc.gridy = 1; gbc.gridx = j; if (j != (col - 1)) header[j] = new JLabel("I" + (j +…
Jessie
  • 363
  • 2
  • 6
  • 20
0
votes
1 answer

Compiler error: could not find member 'subscript' with &&

var card:[[Int]] = bank[numberOfMarked].card; if ((card[0][0] == 0) && (card[1][1] == 0) && (card[2][2] == 0) && (card[3][3] == 0) && (card[4][4] == 0)) { return true; } i am getting the error "Could not find member 'subscript'…
0
votes
1 answer

NA are not allowed

I am new to R and posting so please forgive me if I miss some protocols, but here is my question: I am creating temporary vectors in order to add '0s' where needed. I ultimately want a value comprised of 12 digits and where this is not the case, I…
user3067851
  • 524
  • 1
  • 6
  • 20
0
votes
3 answers

How to change the size of specific letters of the same word in android

I recover chemical formula from a json file, and to write them in the good way (with number in subscript), I use this method: String s = item.get(NAME); StringBuffer sb = new StringBuffer(); for (int i = 0; i < s.length(); i++) { if (s.charAt(i)…
Turvy
  • 882
  • 1
  • 8
  • 23
0
votes
1 answer

what is wrong with subscript of string here in C++

This code should print "something here", but it actually print wrong void test(){ string str = ""; int count = 0; if (count > str.length() - 1){ cout << "something here" << endl; return; } cout << "wrong" <<…
Jaden
  • 45
  • 7
0
votes
1 answer

BASH: How tell if script uses exit?

Say I have two scripts that just print back the return code from a useless subscript: script1 (echo; exit 0) echo $? script2 (echo) echo $? Both give back 0. But is there a way to tell that the first subscript explicitly uses the exit command?
Pithikos
  • 18,827
  • 15
  • 113
  • 136
0
votes
0 answers

Subscripted parameters in Mathematica NDSolve

I'm working on a very long list of Differential Equations that I will eventually need to fit to experimental data but I'm having an issue getting NDSolve to accept my subscripted variables. Since the equations are incredibly long, I've simply given…
0
votes
1 answer

Subscript error when trying to remove blank values from an array in VBA

I am trying to run a Simple formula to remove blank entries from an array. The array I am using is loaded from a field in a data table I have set up in excel called TY. The name of this field is TY[L3 Number]. I want to keep this array dynamic, as…
ImmutableTuple
  • 49
  • 1
  • 2
  • 9
0
votes
2 answers

String Subscript out of range in C++

I'm trying to convert Roman Numerals into Decimal numbers but I keep encountering this error every time I enter a Roman Numeral. I've tried editing the code numerous times but so far I haven't been able to figure out what's going on. Here's my…
Chad P.
  • 17
  • 4
0
votes
1 answer

Dictionary value by key

While trying to get a value from a Dictionary, Xcode is showing me the following error: Could not find an overload for 'subscript' that accepts the supplied arguments class func fromDictionary(enterpriseDictionary:Dictionary) ->…
adheus
  • 3,985
  • 2
  • 20
  • 33
0
votes
1 answer

A subscript must be between 1 and the size of the array affecting Date conversion

I have a formula that is taking an array which outputs number like this 05/28/14 and need to have it formatted as a date. I am using this code and it is telling me "A Subscript must be between 1 and the size of the array.". I think the problem is…
Jesse
  • 27
  • 7
0
votes
2 answers

javascript variable as subscript in an array

I can't find this answer anywhere. I am learning javascript on myself so I guess this is basic. I want to assign a variable "count" as the subscript of an array. var firstnumber = 200; var count = 1; var a; a[count] = firstnumber; therefore to…