The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Access Matrix by row or column
12-28-2017, 11:26 AM
Post: #1
Access Matrix by row or column
Is there a command to select a specific column or row of a matrix?

Ie in Matlab this works:

A(3, : ) % Extract third row

The colon is used as a wildcard. I cant find a way to do this on the Prime except using SUB(), but that requires you to enter lists containing start and end indices of selected region so is not as convenient as wildcarding.

Actually, for a 2D Matrix, just using A(1) will select the 1st row ,but how to fo this for a column? I tried A(:,1) but this errors.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Access Matrix by row or column - Stevetuc - 12-28-2017 11:26 AM
RE: Access Matrix by row or column - JMB - 12-28-2017, 08:19 PM



User(s) browsing this thread: 1 Guest(s)