필터 지우기
필터 지우기

Square Matrix

조회 수: 2 (최근 30일)
Chaklader Asfak
Chaklader Asfak 2011년 8월 18일
i have a very simple quetion. Say , a Matrix (5x1)named A.
A= [ 2;2;2;2;2 ]
How I can make a square matrix (5x5) with all 2 contained from command window taking the A from an excel file ?

채택된 답변

Oleg Komarov
Oleg Komarov 2011년 8월 18일
If you want to take a vector from excel and replicate it such that the result is a square matrix, then:
a = xlsread('myfile.xlsx');
a = repmat(a(:),1,numel(a));
  댓글 수: 1
Chaklader Asfak
Chaklader Asfak 2011년 8월 18일
thanks :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by