Change row vector to column vector

 How can I change this into a column, at the moment all 750 entries are on one row? 

 

p = normal(1:750)-1;

I have tried: 

 

columns = 1;
p = normal(1:750)-1;
p = p(1:columns);

I have also tried: 

 

rows = 1000;
p = normal(1:750)-1;
p = p(1:rows)'; 

NOTE:-


Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.     

Answers: 

It is common practice in MATLAB to use the colon operator : for converting anything into a column vector. Without knowing or caring if normal is a row vector or a column vector, you can force p to be a column vector, like so:   

SEE COMPLETE ANSWER CLICK THE LINK  
https://matlabhelpers.com/questions/change-row-vector-to-column-vector.php

Comments

Popular posts from this blog

Why do I get a "Too many input arguments" error when not passing any?

How is full convolution performed using MATLAB's conv2 function?

Why Red, Green, Blue channels of image separetely are grayscaled (Matlab)?