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/11/02 22:23:32
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了.