Matrix 3x2
a = [1 0 ;
1 0;
0 1 ]
Cell 2x1
b = [ 'Hello ;
'Goodby'];
Wanted outcome c=a*b 3x1
c = ['Hello ;
'Hello;
'Goodby']

댓글 수: 1

b = [ 'Hello ;
'Goodby'];
This is not a cell and not even valid Matlab syntax. Do you mean curly braces?

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

 채택된 답변

Jan
Jan 2021년 3월 10일

1 개 추천

b = {'Hello'; 'Goodby'};
a = [1 0 ;
1 0;
0 1 ];
index = a * [1; 2]
b(index)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2021년 3월 10일

댓글:

2021년 3월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by