Project

Matlab program to display rows and columns

The Matlab program used to display rows and columns of a given matrix is as follows:

clear all
close all
clc
base=[1 2 3 4;5 6 7 8;2 4 6 8;9 7 5 4;2 3 2 4]
%Row vector
c= base(1,:)
%Coloumn vector
a= base(:,1)

output:

base =

1 2 3 4
5 6 7 8
2 4 6 8
9 7 5 4
2 3 2 4


c =

1 2 3 4


a =

1
5
2
9
2

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.