[10648] in Athena Bugs
rsaix 7.5B: matlab
daemon@ATHENA.MIT.EDU (oledoit@Athena.MIT.EDU)
Sun Jul 4 12:51:47 1993
From: oledoit@Athena.MIT.EDU
To: bugs@Athena.MIT.EDU
Date: Sun, 04 Jul 93 12:51:41 EDT
System name: m4-035-17
Type and version: POWER 7.5B
Display type: graygda
What were you trying to do?
When you type:
a=0; a([],1)=[]
What's wrong:
You get the error message:
??? In an assignment A(matrix,matrix) = B, the number of rows in B
and the number of elements in the A row index matrix must be the same.
What should have happened:
I expected matlab to accept the command and do nothing.
The error message makes no sense because the numbers of rows in B (i.e. []) is equal to the number of rows in the A row index matrix (i.e. []) since they are both zero.
I think this is an inconsistency in the treatment of the empty matrix [].
It forces me to make a special case in my program, which is extremely inelegant:
if q1>0
z1(t,1+K1+p1+1:1+K1+p1+q1)=[e1(t-1:-1:max(t-q1,1))' zeros(1,1-(t-q1))];
end