how to linspace to create a coulmn vector

56 views (last 30 days)
Sauravpunit Sidhu
Sauravpunit Sidhu on 16 Feb 2018
Edited: VBBV on 28 Jan 2022
Create a column vector using linspace to enter the values of force from 0 to 550, 50 elements increasing and then 550 to 0, 50 elements decreasing.

Answers (2)

KSSV
KSSV on 16 Feb 2018
Edited: KSSV on 16 Feb 2018
F1 = (0:50:550)' ;
F2 = flipud(F1) ; F2 = (550:-50:0)' ;

VBBV
VBBV on 28 Jan 2022
Edited: VBBV on 28 Jan 2022
A = linspace(0,550,50).';% increasing
AA = linspace(550,0,50).';% decreasing

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!