Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我在大学的一门课程中有一个项目需要各种Matlab功能。我的Matlab版本是由我的工作场所提供的,它没有项目所需的某些工具箱。是否在任何地方都有此类实现的存储库?我在Google上找不到任何相关内容。
虽然我的问题很笼统,但由于我的问题也很具体,所以我列出了我需要且找不到的功能:
回答: 我首先要检查的是MathWorks File Exchange 。 MATLAB用户提交了10,000多个代码,您也许可以找到各种MATLAB工具箱的替代方法。这可能会有所帮助:
M = magic(5); %# Create an example matrix rowMeans = mean(M,2); %# Compute the row means rowStds = std(M,0,2); %# Compute the row standard deviations rowStds(rowStds == 0) = 1; %# Set standard deviations of 0 to 1 for i = 1:size(M,1) M(i,:) = (M(i,:)-rowMeans(i))./rowStds(i); %# Normalize each row of M end %# Or you could avoid the for loop with a vectorized solution... M = bsxfun(@rdivide,bsxfun(@minus,M,rowMeans),rowStds); 显然,这不会涵盖MAPSTD中的所有选项,而是介绍了基本功能。我可以确认上述代码给出的结果与mapstd(M) 。 更多&回答... |
![]() |
![]() |