首页 > 其他 > 详细

A little error

时间:2016-05-02 15:28:17      阅读:255      评论:0      收藏:0      [点我收藏+]

One I used JAVA to recode a MATLAB program in order to reduce the runtime. It proved that MATLAB‘s protogenetic functions, such as matrix multiplication, are so much better than mine. Consequently, my code is nothing.

By the way, there was an error confusing me for a whole day. The complier MyEclipse told me the error occurs at xxth line which said two matrixs‘s sizes are not appropriate for multiplication. 

Solution: I checked the MATLAB code carefully and then made sure that my code is a right replica. Then I made the console print the size of the two matrixs, finding nothing. Next, I doubted my input data is wrong so that I referred to my senior for new right data. It didn‘t work either. However, I found the number of the first matrix‘s columns is always ten times the number of second matrix‘s rows.

Cause:

技术分享

----------------------------------------------------------------

c=[a b];

c=[a

b];

The two syntaxes are totally different. One represents row combination and the other one represents column combination. I thought falsely the second one just has a newline.

 

A little error

原文:http://www.cnblogs.com/whiteonefor/p/5452300.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!