楼主: 波波大人29
4269 0

MATLAB显示错误使用sum 数据类型无效。第一个参数必须为数值或逻辑值。求解 万分感谢 [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

学前班

80%

还不是VIP/贵宾

-

威望
0
论坛币
10 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
20 点
帖子
1
精华
0
在线时间
4 小时
注册时间
2019-1-11
最后登录
2019-8-1

楼主
波波大人29 发表于 2019-7-30 17:28:45 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
是我导入的矩阵格式有误吗?实在是太困惑了。。。

下附代码:
A=load('Service.mat');
W1=load('table.mat');
T=10; % number of time periods
N=43; % number of regions
% row-normalize W
W=normw(W1); % function of LeSage
y=A(:,[3]); % column number in the data matrix that corresponds to the dependent variable
x=A(:,[4,5,6,7,8]); % column numbers in the data matrix that correspond to the independent variables

错误使用 sum
数据类型无效。第一个参数必须为数值或逻辑值。


出错 normw (line 33)
  nterm = sum(W, n);


出错 demopanelscompare (line 43)
W=normw(W1); % function of LeSage

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝


您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-7 18:06