Answer to Question #243270 in MatLAB for Vamsi reddy

Question #243270
2. Vector variables. Make the following variables

a. avec = [3.14 15 9 26]

b. bVec = [2.71 8 28 182], where [] stands for the vector transpose
c. cVec = [5 4.8...-4.8-5] (all the numbers from 5 to -5 in increments of -0.2)
1
Expert's answer
2021-09-29T01:18:52-0400


close all,
clear all,
clc,


%{
    2. Vector variables. Make the following variables
        a. avec = [3.14 15 9 26]
        b. bVec = [2.71 8 28 182], where [] stands for the vector transpose
        c. cVec = [5 4.8...-4.8-5] (all the numbers from 5 to -5 in increments of -0.2)
%}


disp('Solution [a]');
avec = [3.14, 15, 9, 26];
disp(['avec = ',num2str(avec)]);
disp('Transpose of avec = ');
avec=avec'


disp('Solution [b]');
bvec = [2.71, 8, 28, 182];
disp(['bvec = ',num2str(bvec)]);
disp('Transpose of bvec = ');
bvec=bvec'


disp('Solution [c]');
cvec = 5:(-0.2):-5;
disp(['cvec = ',num2str(cvec)]);
disp('Transpose of cvec = ');
cvec=cvec'




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS