According to the following page, MATLAB 2019a should have automatic singleton extension:
My tests show that this is not always true:
% A test array
>> x=false(3,3)
3×3 logical array
0 0 0
0 0 0
0 0 0
% Singleton extension works
>> x([1 3],2)=true
3×3 logical array
0 1 0
0 0 0
0 1 0
% Singleton extension doesn't work
>> x([1 3],2:3)=[true true]
Unable to perform assignment because the size of the left
side is 2-by-2 and the size of the right side is 1-by-2.

 채택된 답변

Paul
Paul 2022년 3월 29일

0 개 추천

The linked blog post does not show assignment (=) included uder "Supported Operators and Functions." It still isn't:
doc bsxfun

댓글 수: 1

FM
FM 2022년 3월 29일
OK, thanks. I will code around its absence. Pity, it would streamline the code.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

FM
2022년 3월 29일

댓글:

FM
2022년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by