如何解决如何使用本征从vector <vector <float >>创建矩阵?
我有一个大小为N的向量,其中包含大小为3(3D点)的向量。如何将其转换为N行3列的本征矩阵?
解决方法
如果我理解您的问题,这应该可以完成工作。
int main(){
int x;
int res1 = 0,res2 = 0;
scanf("%u",&x);
//reverse the digits of a number
if (x == 0) {
res2 = 1;
}
//count number of zeroes in a number using the same value from the scanf()
do {
res1 = res1 * 10 + x % 10;
x = x / 10;
} while (x != 0);
printf("%u %u\n",res1,res2);
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。