Borrar filtros
Borrar filtros

Using linspace for dividing thicknesses and then adding them up

3 visualizaciones (últimos 30 días)
Chirag Anand
Chirag Anand el 13 de Jun. de 2017
Editada: KSSV el 13 de Jun. de 2017
I am using linspace to break up a given thickness into different points. For example if thickness is 200 mm then linspace(0,200,500). So I ahve two materials of thickness 200 and 300 mm place on top of one another. I divide the first thickness into linspace (0,200,500) and the other thickness (0,300,500). But while plotting the results i need the array of distance to be linear eg from 0 to 500 mm and the calculations at each point. How do I get this?
  4 comentarios
Adam
Adam el 13 de Jun. de 2017
You should just be able to concatenate your thickness arrays then e..g
thickness200 = linspace(0,200,500);
thickness300 = linspace(0,300,500);
totalThickness = [thickness200, thickness300];
Chirag Anand
Chirag Anand el 13 de Jun. de 2017
Thanks but then the concatenated matrix would be {0....200 and then 0... 300]. I want it to be [0....200 and then 200.something....500]

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 13 de Jun. de 2017
Editada: KSSV el 13 de Jun. de 2017
t1=linspace(0,200,500);
t2=linspace(200,500,500);
t12=[t1 t2];

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by