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
1 answer

Overload subscript operator for base's member

#include #include // strlen, strcpy Here we have the Base class with a non-default ctor, a getter for name and its destructor. class Base { char *name_; public: Base(const char* str) : name_{new char[strlen(str)]} { …
shinichi
  • 33
  • 7
0
votes
0 answers

Subscript indices must either be real positive integers or logicals in impulse response?

I want to find the impulse response of this causal system y(n) = 0.32x(n) + 0.68x(n-1) + 0.4x(n-2) - 0.6y(n-2) 0≤n≤100 When I use the filter function everything works fine, the code is here: figure(1) n=[0:100]; d=inline('n==0'); a=[1 0.6 ]; %…
Ria.Np
  • 16
  • 4
0
votes
1 answer

Program Fails to Assign User Input to Array Subscripts

My program is supposed to prompt you to enter a team name, followed by the names of the four team members, and then loop that over three more times. It should then display each of the team names with their corresponding members, for example: Members…
0
votes
1 answer

Ambiguous use go 'subscript'

I am trying to get data that has been encoded as json in a php script. My code: func getJson(completion: @escaping (Array) -> Void) { activityIndicatior.center = self.view.center activityIndicatior.hidesWhenStopped = true …
B.Chok
  • 23
  • 3
0
votes
1 answer

Swift 3 subscript range works for first cluster but not for middle

I'm trying to figure out why the following works on the first string cluster (character) but not on a second one. Perhaps the endIndex cannot be applied on another String? let part = "A" let full = "ABC" print(full[part.startIndex ...…
jazzgil
  • 2,250
  • 2
  • 19
  • 20
0
votes
1 answer

Subscript out of range - Most computers work fine (mine included)

I am a new user of vba. There is recently a vba problem that has left me rather clueless and helpless - subscript out of range - on a particular user's computer when every other user seems to have no issue with using the macro (myself included)…
fangfy
  • 1
0
votes
1 answer

Matplotlib 2.0 subscript outside of baseline when super and subscript are both used

With matplotlib 2.0 I have been having strange behavior when I use both subscript and superscript on the same character. When they are combined, the subscript goes down entirely below the baseline. This didn't happen with MPL 1.5. Here is a complete…
Samwise
  • 475
  • 1
  • 4
  • 10
0
votes
0 answers

Sub Array with range swift 3

I am getting the whole array from core-data, trying to make sub-array with range but it's not working my code is var list : [FeedbackRound] = [] list = try CoreDataInterface.sharedInstance.managedObjectContext.fetch(fetchRequest) as!…
Sheshnath
  • 3,293
  • 1
  • 32
  • 60
0
votes
1 answer

Swift Dictionary access value using key within extension

It turns out that within a Dictionary extension, the subscript is quite useless since it says Ambiguous reference to member 'subscript'. It seems I'll either have to do what Swift does in its subscript(Key) or call a function. Any ideas? For…
funct7
  • 3,407
  • 2
  • 27
  • 33
0
votes
2 answers

Can't get subscript text, from parsing html

I am parsing a website, for an inorganic compound, and need to get it's chemical formula. let data = NSData(contentsOf: URL(string: "https://en.wikipedia.org/wiki/Gold(III)_bromide")!) let doc = TFHpple(htmlData: data as! Data) if let elements =…
Benja0906
  • 1,437
  • 2
  • 15
  • 25
0
votes
2 answers

Getting NSCFString objectAtIndexedSubscript with NSLog in cellForRowAtIndexPath

I've finished my app using this method and the last call I'm implementing is a simple JSON response which I need to parse and it is giving me: [__NSCFString objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x17005caa0' There…
Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
0
votes
1 answer

subscripted letters in UITextField placeholder

I need to learn about ways of doing this. The options I am aware of are: 1) Load my own custom font which includes subscripted letters, or 2) Simulate a "placeholder" with two UILabels positioned directly over the UITextField, and make those…
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
0
votes
1 answer

writing a label in R for a plot using text, and subscripts using either bquote, paste or expression

I am having some difficulty with the use of quote, paste and expression. I use a package that gives me some plot based on some results obtained from a data file. The results are saved as objects (MIN.ED and MIN.error). For the plot, I would like to…
0
votes
1 answer

Error in `[<-`(`*tmp*`, i, succ, value = 1) : subscript out of bounds

I have to simulate an image with a white crack on a black background. So I defined a function that adds to a matrix with all elements equal to zero some consecutive points equal to one. The function is the following: crepa<-function(matrice) { …
0
votes
2 answers

Ambiguous Use of Subscript (Swift 3)

I am using the subscript in the following code incorrectly for this Firebase data pull, but I can't figure out what I am doing wrong. I get an error of Ambiguous use of subscript for the let uniqueID = each.value["Unique ID Event Number"] as! Int…
Ben
  • 3,346
  • 6
  • 32
  • 51