Borrar filtros
Borrar filtros

How to define range for angle

5 visualizaciones (últimos 30 días)
farheen asdf
farheen asdf el 28 de Ag. de 2015
Respondida: Star Strider el 28 de Ag. de 2015
I have two angles theta1 and theta2 such that 0<theta1<pi/2 and 0<theta2<pi How do I define these angles in Matlab? I have used theta1=0:pi/2; theta2=0:pi;
but the problem is that further down in the task i need to use (theta1+theta2) which is not possible since by above range theta1 and theta2 have different dimensions.

Respuesta aceptada

Star Strider
Star Strider el 28 de Ag. de 2015
If you want them both to have the same dimensions, use the linspace function:
theta1 = linspace(0, pi/2, 50);
theta2 = linspace(0, pi, 50);
Both of these have the length determined by the third argument (here 50), producing a (1x50) vector for each one.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by