Borrar filtros
Borrar filtros

write m script file or create matrix

4 visualizaciones (últimos 30 días)
Rashmi Amarathunga
Rashmi Amarathunga el 21 de Abr. de 2020
Comentada: Rashmi Amarathunga el 25 de Abr. de 2020
i want write m script file for create 5x4 matrix in which first two rows are zeros and last three rows are ones.how do i create this
  1 comentario
Rik
Rik el 21 de Abr. de 2020
You can find guidelines for posting homework on this forum here.

Iniciar sesión para comentar.

Respuesta aceptada

Prasad Reddy
Prasad Reddy el 23 de Abr. de 2020
A=zeros(2,4) % creaes a 2X4 matrix of zeros
B=ones(3,4) % creates a 3X4 matrix of ones.
c=[A;B] % combinng thoe two matixs
% this code will produce the required matrix
  2 comentarios
Rik
Rik el 23 de Abr. de 2020
Please don't post complete solutions to homework questions.
Rashmi Amarathunga
Rashmi Amarathunga el 25 de Abr. de 2020
Thank you for ur answer.it works

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by