全文预览

matlab字符串单元数组与结构体作业答案

上传者:业精于勤 |  格式:doc  |  页数:7 |  大小:62KB

文档介绍
escend') new = 93 90 89 85 82 78 77 75 62 index =462735918 >> student(1).mean= mean(student(1).scores) student(2).mean=mean(student(2).scores) student(3).mean= mean(student(3).scores) student = 1x3 struct array with fields: name number scores subject mean student = 1x3 struct array with fields: name number scores subject mean student = 1x3 struct array with fields: name number scores subject mean >> student(1) ans = name: 'bam' number: 1 scores: [75 89 82] subject: 'english,math,chinese' mean: 82 >> student(2) ans = name: 'mark' number: 2 scores: [93 78 90] subject: 'english,math,chinese' mean: 87 >> student(3) ans = name: 'jimin' number: 3 scores: [85 62 77] subject: 'english,math,chinese' mean: 74.6667 >> [new,index]=sort([student.mean],'descend') new = 87.0000 82.0000 74.6667 index =213

收藏

分享

举报
下载此文档