% CAT(2,A,B) is the same as [A,B]. % CAT(1,A,B) is the same as [A;B].
I seem to need to know this in order to understand what I'm doing cat.
cat
[A,B]
is a matrix formed by placing B to the right of A, and
[A;B]
- a matrix formed by placing B below A.
Learn also about horzcatand vertcat.
horzcat
vertcat
[A, B] does col cat [A; B] does row cat
eg:
x = [1, 2, 3]; y = [7, 8, 9]; [x, y] == > [1, 2, 3, 7, 8, 9] becomes a 1x6 array [x; y] == > [1, 2, 3] [7, 8, 9] becomes a 2x3 array
Just try in matlab and open ans to see the difference
Source: https://habr.com/ru/post/1740488/More articles:Joining a comment () to add a surrounding tag - commentsHow to encode special characters for POST using Spring / Roo - javaDoes Java support dynamic method invocation? - javaHow to get the logical results of a regular expression in Ant? - regexHow to get a complete project by date in Source Safe? - visual-sourcesafeThe Ado.net Fill method does not throw an error when starting a stored procedure that does not exist - c #Доступ к InfoMessages для запросов SQL Server в С# - c#Django url shortcut performance - performanceIs it possible to create dimensional types in Scala? - scalaПервичные ключевые имена в свободном Нейбернате - sql-serverAll Articles