필터 지우기
필터 지우기

How would I create a function using a positive integer 'q' in a 5 by q matrix, where row 'i' consists of i, 2i, 3i...qi.

조회 수: 1 (최근 30일)
This is a homework question I have been stuck on.

채택된 답변

Jan
Jan 2016년 2월 14일
편집: Jan 2016년 2월 14일
You do not need bsxfun, because Matlab uses the dyadic product for [N x 1] * [1 x M] arrays:
q = 7;
(1:5).' * (1:q)
Sorry for solving your homework. You could try to solve this with two nested loops instead. Simply try it and post the code in case of problems.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by