本文介绍了大学的Matlab问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 所以我对大学进行了这个matlab练习。没什么太难的但我也是新的matlab的东西而且我被卡住了......明天就要到了,所以我真的需要帮助!我会发布问题,如果有人愿意帮助我会很感激:) 创建一个函数,它将收到一个整数N(输入),它会返回两个矢量P1 P2(输出),均为N尺寸。 P1的空间将为[0,5]并且它将包含随机数,而P2的空间将为[5,10]并且也包含随机数。写下每个命令,它将替换P1中的任何数字,大于2.5,用1和P2中的任何数字小于8,用0. 解决方案 不,这不是很好的说话。你从一开始就试图做错事。 基本上,答案是: http://www.mathworks.com/help/matlab/numeric-types.html [ ^ ]。 但它不会在这一刻真的帮助你。你是从错误的步骤开始的。在不理解主题的基础知识的情况下进行一些编程是完全没用的:一般原则,技术及其目标,语言等等。您需要从一开始就开始,例如, http://www.tutorialspoint.com/matlab [ ^ ], https://en.wikibooks.org/wiki/MATLAB_Programming [ ^ ], 或类似的东西... -SA So I have this matlab exercise for university..nothing too difficult but I'm new too the matlab thing and i got stuck..it is due tomorrow so I really need help! I will post the problem if anyone is willing to help I would appreciate it :)Create a function that it will recieve an integer N (input) and it'll return two vectors P1 P2 (output) both with N size. P1's space will be [0,5] and it'll consists random numbers while P2's space will be[5,10] and consist of random numbers as well. Write every command that it will replace any number in P1 bigger tha 2.5 with 1 and any number in P2 smaller than 8 with 0. 解决方案 No, this is not good talking. You are trying to do wrong things from the very beginning.Essentially, the answer would be: http://www.mathworks.com/help/matlab/numeric-types.html[^].But it won't really help you at this moment. You are starting with wrong steps. It's totally useless to do some programming without understanding the basics of the subject: general principles, technology and its goal, the language, and so on. You need to start from the very beginning, for example,http://www.tutorialspoint.com/matlab[^],https://en.wikibooks.org/wiki/MATLAB_Programming[^],or something similar…—SA 这篇关于大学的Matlab问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-20 03:17