I want to add my elemto the end of the array A.
elem
A
What should I do?
Use the following
A = [A elem] % for row array
or
A = [A; elem] % for col array
Edit: Another easy way (as @BenVoigt suggested) to use the endkeyword
end
A(end+1) = elem;
which works for both row and column vectors.
Another way -
Source: https://habr.com/ru/post/1569057/More articles:.htaccess file does not work on localhost XAMPP - phpWhenever the cron job in Rails fails with the production database, an error is not configured - ruby-on-railsProgram structure using asyncio - pythonHow to make several UIImages simultaneously fall with gravity? - iosПереключение уровня в OpenLayers 3 - javascriptUnable to set headers after sending them to express - javascriptJava drawing weird visual artifacts / errors - javaiOS SWRevealViewController - передача данных между контроллерами - iosGrep for word and line before the match - linuxIs Kotlin 100% compatible with ART on Android? - androidAll Articles