Gistlib Logo

gistlib

create vector of 7 ranges between 5 and 75 in matlab

You can create a vector that contains 7 linearly spaced values between 5 and 75 by using the linspace function:

main.m
v = linspace(5,75,7)
21 chars
2 lines

This will create a row vector v that contains 7 equally spaced values between 5 and 75, inclusive. The output will be:

main.m
v =

     5    15    25    35    45    55    65    75
54 chars
4 lines

similar matlab code snippets

angle between two vectors in matlab
find vector angle between 2 corrdinates in matlab
create vector x from 0 to l with m constant spacing in matlab
find the first three smallest values in a vector in matlab
create a 1 x 100 vector of x values according to -15<x<0 in matlab
calculate angle between vectors in matlab
v(20) = 9.7 * (1-(20/50).^4).^2 in matlab
vector called x from 0 to l with m elements in between by using the function linspace( ) in matlab
create a 1 x 100 vector of x values according to -15<x<0 and use elementwise operators to create 3 more 1x100 vectors in matlab
find the same element within a vector in matlab

related categories

matlab
vector
range

gistlibby LogSnag