Linspace function, MATLAB Programming

Linspace function:

Likewise, the linspace function generates a linearly spaced vector; linspace(x,y,n) generates a vector with n values in the inclusive range from x to y. For illustration, the following generates a vector with 5 values linearly spaced between 3 and 15, involving the 3 and 15:

>> ls = linspace(3,15,5)

ls =

3   6   9   12   15

The Vector variables can also be generated using existing variables. For illustration, a new vector is generated here consisting first of all the values from nv followed by all values from ls:

>> newvec = [nv ls]

newvec =

1   3   5   7   9   3   6   9   12   15

Place two vectors altogether like this to generate a new one is termed as concatenating the vectors.

 

 

Posted Date: 10/18/2012 4:14:41 AM | Location : United States







Related Discussions:- Linspace function, Assignment Help, Ask Question on Linspace function, Get Answer, Expert's Help, Linspace function Discussions

Write discussion on Linspace function
Your posts are moderated
Related Questions
Variable number of input arguments: For illustration, the below function areafori has a variable number of input arguments, either the 1 or 2. The name of the function stands

i need help with a monte carlo simulation. I have most of the code, but I can''t get it to plot correctly

Vectors and Matrices: The Vectors and matrices are used to store sets of values, all of which are similar type. A vector can either be a column vector or a row vector. The mat

Why Function stubs are used?

Simple Related Plot Functions: The other functions which are useful in customizing plots are the figure, clf, hold, leg-end, and grid. The short description of such functions

whats thye procedure for entering say an LP model, maximisation an objective funtion ''10x+3y'' subject to: 40 300x +298y>=299 x+y=1

MATLAB. • MATLAB Programming; • Simulation in MATLAB.

A fence enclosure consists of a rectangle of length L and width 2 R , and a semicircle of radius R , as shown in Figure 1. The enclosure is to be built to have an area of 1600 m

Solution by using pdepe function functionpdex1 m = 0; x = linspace(0,1,100); t = linspace(0,0.2,10);   sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t); % Ext

How to Start Working withSimpower: 1. In the Simulink screen, open a new "Model" (File àNewà Model), name it and save it. 2. Expand the SimPowerSystems library, select and