Error using ==> surf at 78 Z must be a matrix,not a scalar or vector.怎么将i变为矩阵那delta=0:0.1:1;epsilon=0:0.1:1;[xx,tt] = meshgrid(epsilon,delta);i=-2*((1-delta).*(1-epsilon).*log2(1/2*(1-delta).*(1-epsilon))+delta.*(1-epsilon).*log2(1/2*
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 13:36:51
Error using ==> surf at 78 Z must be a matrix,not a scalar or vector.怎么将i变为矩阵那delta=0:0.1:1;epsilon=0:0.1:1;[xx,tt] = meshgrid(epsilon,delta);i=-2*((1-delta).*(1-epsilon).*log2(1/2*(1-delta).*(1-epsilon))+delta.*(1-epsilon).*log2(1/2*
Error using ==> surf at 78 Z must be a matrix,not a scalar or vector.怎么将i变为矩阵那
delta=0:0.1:1;
epsilon=0:0.1:1;
[xx,tt] = meshgrid(epsilon,delta);
i=-2*((1-delta).*(1-epsilon).*log2(1/2*(1-delta).*(1-epsilon))+delta.*(1-epsilon).*log2(1/2*delta.*(1-epsilon))+(1-delta).*epsilon.*log2(1/2*(1-delta).*epsilon)+delta.*epsilon.*log2(1/2*delta.*epsilon));
surf(xx,tt,i);
Error using ==> surf at 78 Z must be a matrix,not a scalar or vector.怎么将i变为矩阵那delta=0:0.1:1;epsilon=0:0.1:1;[xx,tt] = meshgrid(epsilon,delta);i=-2*((1-delta).*(1-epsilon).*log2(1/2*(1-delta).*(1-epsilon))+delta.*(1-epsilon).*log2(1/2*
i表达式中的delta用tt替换,epsilon用xx替换,就ok了.