Group Abstract Group Abstract

Message Boards Message Boards

1
|
6.1K Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

Creating a single col matrix

Posted 11 years ago
Attachments:
POSTED BY: Muzahoo jee

$\mathit{Mathematica}$ makes no difference between column and row vectors, column and row matrices; they all are just lists. There are no column lists and no row lists in $\mathit{Mathematica}$.

In[13]:= muzahooM[n_Integer] := {Join[{v1, v2, v3}, ConstantArray[vRng, n - 6], {v4, v5, v6}]} /; n > 5

In[14]:= muzahooM[6]
Out[14]= {{v1, v2, v3, v4, v5, v6}}

In[15]:= MatrixQ[muzahooM[6]]
Out[15]= True

In[16]:= TensorRank[muzahooM[6]]
Out[16]= 2

In[17]:= Dimensions[muzahooM[6]]
Out[17]= {1, 6}

In[18]:= muzahooM[17]
Out[18]= {{v1, v2, v3, vRng, vRng, vRng, vRng, vRng, vRng, vRng, vRng,vRng, vRng, vRng, v4, v5, v6}}

In[19]:= MatrixQ[muzahooM[17]]
Out[19]= True

In[20]:= TensorRank[muzahooM[17]]
Out[20]= 2

In[21]:= Dimensions[muzahooM[17]]
Out[21]= {1, 17}
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard