Horzcat error, attempting to display a matrix 3x11

1 visualización (últimos 30 días)
olivia
olivia el 13 de Sept. de 2023
Comentada: Dyuman Joshi el 13 de Sept. de 2023
R=[148;36;49;-45;166] % 5x1 double
Rvx= [ 1 0 0; 0 cos(R) sin(R); 0 -sin(R) cos(R)];
The output can have zeros where there is a void. I believe I understand the error but don't know how to fix it.

Respuesta aceptada

Dyuman Joshi
Dyuman Joshi el 13 de Sept. de 2023
R=[148;36;49;-45;166] % 5x1 double
R = 5×1
148 36 49 -45 166
Rvx= [1 zeros(1,2*numel(R)); 0 cos(R)' sin(R)'; 0 -sin(R)' cos(R)']
Rvx = 3×11
1.0000 0 0 0 0 0 0 0 0 0 0 0 -0.9410 -0.1280 0.3006 0.5253 -0.8755 -0.3383 -0.9918 -0.9538 -0.8509 0.4833 0 0.3383 0.9918 0.9538 0.8509 -0.4833 -0.9410 -0.1280 0.3006 0.5253 -0.8755
  2 comentarios
olivia
olivia el 13 de Sept. de 2023
is there a way to shrink the output so it doesn't display as columns 1-9 & 10-11
Dyuman Joshi
Dyuman Joshi el 13 de Sept. de 2023
I don't understand what you mean.
Could you elaborate more?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by