Azzera filtri
Azzera filtri

How to create row vector or 3-D array

2 visualizzazioni (ultimi 30 giorni)
DoinK
DoinK il 14 Nov 2022
Modificato: DoinK il 16 Nov 2022
I want to create row vector that can be multiplied to a matrix.
First, let me explain the matrix.
A_0 is square matrix of order 4*N*(M+1).
A_0=[A_00 A_01 0 0;
A_10 A_11 A_12 0;
A_20 A_21 A_22 A_23;
A_30 A_31 A_32 A_33].
Every matrix in A_0 are square matrix of order N*(M+1).
So i want to create this kind of row vector:
p^(i) with i=0, i get p^(0) %^(i) is not rank, its just index, so p^(0) !=1
p^(i)=(p_(4i)^(i), p_(4i+1)^(i), p_(4i+2)^(i), p_(4i+3)^(i)), %p^(i) has 4*N*(M+1) elements
where
p_j^(i)=(p_(j,0,1)^(i),p_(j,0,2)^(i),...,p_(j,0,N)^(i),
p_(j,1,1)^(i),p_(j,1,2)^(i),...,p_(j,1,N)^(i),...,
p_(j,M,1)^(i),p_(j,M,2)^(i),...,p_(j,M,N)^(i)) i,j>=0 , 4i<=j<=4i+3.
I need to multiply p^(0) * A_00.
For example,
p^(0)*A_0=(p_(0)^(0), p_(1)^(0),p_(2)^(0),p_(3)^(0))*[A_00 A_01 0 0;
A_10 A_11 A_12 0;
A_20 A_21 A_22 A_23;
A_30 A_31 A_32 A_33].
Assume N=3 M=4,
p_(0)^(0) * A_00=
(p_(0,0,1)^(0),p_(0,0,2)^(0),p_(0,0,3)^(0),
p_(0,1,1)^(0),p_(0,1,2)^(0),p_(0,1,3)^(0),
p_(0,2,1)^(0),p_(0,2,2)^(0),p_(0,2,3)^(0),
p_(0,3,1)^(0),p_(0,3,2)^(0),p_(0,3,3)^(0)),
p_(0,4,1)^(0),p_(0,4,2)^(0),p_(0,4,3)^(0)) have N*(M+1)=15 elements and A_00 has N*(M+1) elements too so it can be multiplied.
For the code, i only know how to make row vector of 1 row and N column:
p=sym('p',[1 N]) .
So, i have to make p^(0)=(p_(0)^(0), p_(1)^(0),p_(2)^(0),p_(3)^(0)) that can be open up again to have N*(M+1) elements.
I only need p^(0) because from my equation, the formula to search p^(n)=p^(0)*R %where R is square matrix of order 4*N*(M+1).
  5 Commenti
Jan
Jan il 14 Nov 2022
What do you call an "infinite matrix"? Do you mean a matrix ith an infinite number of elements? This would need an infinite amount of RAM.
DoinK
DoinK il 14 Nov 2022
Ah you are right Sir, let me edit the question again.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by