How to replace the number of each element of a matrix with a subscript?

I want to get the matrix as Figure 2. There should be two ways to achieve the result.

  1. There is a matrix as Figure 1, and change it to the form of Figure 2.

  2. Generating the matrix as Figure 2 directly.

How can I do it? Thanks.

Note:The matrix in Figure 2 is a symmetric matrix

Figure 1

enter image description here

Figure 2

enter image description here

Codes

{{C11,C12,C13,C14,C15,C16},{0,C22,C23,C24,C25,C26},{0,0,C33,C34,C35,C36},{0,0,0,C44,C45,C46},{0,0,0,0,C55,C56},{0,0,0,0,0,C66}}

filtering – How to delete certain terms in a polynomial with variables in subscript?

I have a polynomial in the following style,

polynomialdata= Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0] + Subscript[xy, 1, 1][0]*Subscript[xy, 2, 1][0] +  Subscript[xy, 1, 2][0]*Subscript[xy, 2, 2][0] +  Subscript[xy, 2, 1][0]*Subscript[xy, 2, 2][0] + Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0]*Subscript[xy, 2, 1][0]*Subscript[xy, 2, 2][0] + Subscript[xy, 2, 1][0]*Subscript[xy, 3, 1][0] + Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0]*Subscript[xy, 2, 1][0]*Subscript[xy, 3, 1][0]

I wonder how to remove certain terms in the polynomialdata such as Subscript[xy, 2, 1][0] Subscript[xy, 3, 1][0] or keeping terms such as Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0]*Subscript[xy, 2, 1][0]*Subscript[xy, 3, 1][0].

Probably one stupid way is to do the following

Keep[expr_] := 
 expr /. {Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0]-> 0, Subscript[xy, 1, 1][0]*Subscript[xy, 2, 1][0]-> 0, Subscript[xy, 1, 2][0]*Subscript[xy, 2, 2][0]-> 0, Subscript[xy, 2, 1][0]*Subscript[xy, 2, 2][0] -> 0, Subscript[xy, 2, 1][0]*Subscript[xy, 3, 1][0]-> 0}

Keep[data]

the result gives 0; which is not I expected.

I want the outcome to be Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0]*Subscript[xy, 2, 1][0]*Subscript[xy, 2, 2][0] + Subscript[xy, 1, 1][0]*Subscript[xy, 1, 2][0]*Subscript[xy, 2, 1][0]*Subscript[xy, 3, 1][0]. Maybe I could use DeleteCases function.

However, if the data has many terms, it will be very inefficient to do the above removing. Is there any way to solve it? Thank you very much in advance!

macbook pro – Subscript, super script, and special symbols as Keyboard shortcuts

I need to write a statistical paper. So I need to use subscripts and superscripts, often with in the same alphabet. For example X^2 at time “t”, time “t-1” etc. I also need to type special symbols like beta, theta, alpha etc.
This is possible in Microsoft Word I am aware, but i often use a note taking app like notability to jot down my notes before transferring them into the final draft.

For apps like that you need to harcode the symbol and the keyboard shortcut in the “keyboards” in system preferences.

  1. Is there a way to add these subscripted and superscripted versions of alphabets and numbers to that window?
  2. If the above is fulfilled, Is there a way I can do this without having to type out each in the characters in the keyboard window, and instead upload everything from a previously created file?

plotting – Variable subscript in AxesLabel

I am calling $y_{n}=x^{n}$ and I want to plot $ln(y_{n})$ for a number of different integer values of $n$ (I know this is very simple- it’s actually a much simpler version of what I’m actually trying to do). If I execute

Table(Plot(Log(x^n), {x, 0, 1}, 
  AxesLabel -> {"x", "ln(" Subscript(y, n) ")"}), {n, 1, 3})

the final part of the $y$ axis label moves to the front. Is there any way to avoid this whilst also properly displaying the subscript. Thanks in advance for any help.

c++ – error: invalid types ‘int[int]’ for array subscript

I keep receiving this error in some of my functions, how can I fix it?

“error: invalid types ‘float(float)’ for array subscript
99 | avg(i) = sum(static_cast(i)) / 5;
| ^”

void count (int s(), float avg(), int size)
{
float sum = 0.0;
for (int i = 0; i < size; i++)
{
//sum of test scores of students
cin >> s(i);
{
sum += s(i);
// calculate average
avg(i) = sum(static_cast(i)) / 5;

}

}
}

macos – Why can’t I see subscript “s” (Unicode Character “ₛ” (U+209B)) even though I can see lots of other unicode characters?

So you can copy paste even if you can’t see it – subscript “s” (Unicode Character “ₛ” (U+209B))

My main meta question Should I edit the squares in this title? Is it just me who’s seeing them? explains that when I view the site https://www.compart.com/en/unicode/U+209B

Question: I use unicode characters from compart.com and elsewhere frequently (greek letters, arrows, degrees symbol) and I’ve never had a problem, what is suddenly so challenging about this subscript s?


I see this in MacOS 10.11 and Chrome on a late 2012 MacBook Air

ee

and this in MacOS 10.15 and Safari on a brand new 2020 MacBook Air

ee

Format math formulas in Google Docs – nest multiple superscript and subscript levels

Does anyone know if Google Docs supports nested superscripts and subscripts like the following?

Ax3rd

C.x2nd

When I try the Format-> Text menu options, everything is formatted relative to the main line. If the same formatting is applied to text that already has this attribute, this option is disabled instead of allowing embedding in text.