matlab作图问题n=data(1:90,1)p=data(1:90,1:90)x=1:50a=p^x*ny=sum(a)n是列向量p是方阵a是列向量为什么做不出离散图形?Error using ==> mpowerAt least one operand must be scalar.Error in ==> Untitled at 4a=p^x*n

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 15:39:41
matlab作图问题n=data(1:90,1)p=data(1:90,1:90)x=1:50a=p^x*ny=sum(a)n是列向量p是方阵a是列向量为什么做不出离散图形?Errorusing==>

matlab作图问题n=data(1:90,1)p=data(1:90,1:90)x=1:50a=p^x*ny=sum(a)n是列向量p是方阵a是列向量为什么做不出离散图形?Error using ==> mpowerAt least one operand must be scalar.Error in ==> Untitled at 4a=p^x*n
matlab作图问题
n=data(1:90,1)
p=data(1:90,1:90)
x=1:50
a=p^x*n
y=sum(a)
n是列向量
p是方阵
a是列向量
为什么做不出离散图形?
Error using ==> mpowerAt least one operand must be scalar.
Error in ==> Untitled at 4a=p^x*n

matlab作图问题n=data(1:90,1)p=data(1:90,1:90)x=1:50a=p^x*ny=sum(a)n是列向量p是方阵a是列向量为什么做不出离散图形?Error using ==> mpowerAt least one operand must be scalar.Error in ==> Untitled at 4a=p^x*n
你把表达式改一下,就ok了
a=p^x*n 改 a=p.^x.*n