matlab 新手提问A = 0.5000 0.2500 0.1250 0.1250>> H1=-sum(A.*log2(A)) H1=-sum(A.*log2(A))? |Error:The expression to the left of the equals sign is not a valid target for an assignment.>>
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/19 13:11:15
![matlab 新手提问A = 0.5000 0.2500 0.1250 0.1250>> H1=-sum(A.*log2(A)) H1=-sum(A.*log2(A))? |Error:The expression to the left of the equals sign is not a valid target for an assignment.>>](/uploads/image/z/8644036-4-6.jpg?t=matlab+%E6%96%B0%E6%89%8B%E6%8F%90%E9%97%AEA+%3D++++0.5000++++0.2500++++0.1250++++0.1250%26gt%3B%26gt%3B++H1%3D-sum%28A.%2Alog2%28A%29%29+H1%3D-sum%28A.%2Alog2%28A%29%29%3F++++++%7CError%3AThe+expression+to+the+left+of+the+equals+sign+is+not+a+valid+target+for+an+assignment.%26gt%3B%26gt%3B)
matlab 新手提问A = 0.5000 0.2500 0.1250 0.1250>> H1=-sum(A.*log2(A)) H1=-sum(A.*log2(A))? |Error:The expression to the left of the equals sign is not a valid target for an assignment.>>
matlab 新手提问
A = 0.5000 0.2500 0.1250 0.1250>> H1=-sum(A.*log2(A)) H1=-sum(A.*log2(A))? |Error:The expression to the left of the equals sign is not a valid target for an assignment.>>
matlab 新手提问A = 0.5000 0.2500 0.1250 0.1250>> H1=-sum(A.*log2(A)) H1=-sum(A.*log2(A))? |Error:The expression to the left of the equals sign is not a valid target for an assignment.>>
>> A =[0.5000 0.2500 0.1250 0.1250];
>> H1=-sum(A.*log(A)/log(2)) % matlab里只能识别log (就是ln)
H1 =
1.7500
>>