求教,根据A列的类别,求其他列对应行的和。
Show older comments
首先,第131列有4中类别,分别为1.2.3.4四种,前面利用语句按照升序排好,同时前面130列也按131列顺序排列。这一步处理好了!!!!问题来了:
其次,比如第131列第1行到第20行为1,那么我需要对前面1到130列的1到20行分别进行列相加;
第131列第21行到第40行为2,那么同理,需要对前面1:130列的21到40行分别进行列相加
以此类推到第131列为4!
请问这个语句该怎么写?
Accepted Answer
More Answers (0)
Categories
Find more on 环境和设置 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!