如何使用循环语句缩短程序subplot(521);plot(index,a1);subplot(522);plot(index,a2);subplot(523);plot(index,a3);subplot(524);plot(index,a4);subplot(525);plot(index,a5);subplot(526);plot(index,d1);subplot(527);plot(index,d2);subplot(528);plot(

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/07 19:48:13
如何使用循环语句缩短程序subplot(521);plot(index,a1);subplot(522);plot(index,a2);subplot(523);plot(index,a3);subplot(524);plot(index,a4);subplot(525);plot(index,a5);subplot(526);plot(index,d1);subplot(527);plot(index,d2);subplot(528);plot(

如何使用循环语句缩短程序subplot(521);plot(index,a1);subplot(522);plot(index,a2);subplot(523);plot(index,a3);subplot(524);plot(index,a4);subplot(525);plot(index,a5);subplot(526);plot(index,d1);subplot(527);plot(index,d2);subplot(528);plot(
如何使用循环语句缩短程序
subplot(521);
plot(index,a1);
subplot(522);
plot(index,a2);
subplot(523);
plot(index,a3);
subplot(524);
plot(index,a4);
subplot(525);
plot(index,a5);
subplot(526);
plot(index,d1);
subplot(527);
plot(index,d2);
subplot(528);
plot(index,d3);
subplot(529);
plot(index,d4);
subplot(5,2,10);
plot(index,d5); 以上是程序的一部分,我想问下可不可以把这段程序用循环语句简练的表达出来,这样实在是太麻烦了,麻烦大神老师们给看看,跪谢!

如何使用循环语句缩短程序subplot(521);plot(index,a1);subplot(522);plot(index,a2);subplot(523);plot(index,a3);subplot(524);plot(index,a4);subplot(525);plot(index,a5);subplot(526);plot(index,d1);subplot(527);plot(index,d2);subplot(528);plot(
也许可以这样:
1、subplot语句因为其参数是有规律地递增,所以是完全可以用循环表达的.
2、plot语句,其中的index和第二个参数是常量还是变量?如果index是变量,则可以在每次循环中进行更新.第二个参数,完全可以把a1, a2, a3, a4,a5, d1,等等,这样的参数事先组成一个数组,然后每次循环读取对应的值,然后数组的索引递增,这样就能把两个语句都放到循环中了.

如何使用循环语句缩短程序subplot(521);plot(index,a1);subplot(522);plot(index,a2);subplot(523);plot(index,a3);subplot(524);plot(index,a4);subplot(525);plot(index,a5);subplot(526);plot(index,d1);subplot(527);plot(index,d2);subplot(528);plot( 编写程序,使用循环语句来计算0到100的所有奇数之和 编写c程序,使用循环语句,计算1到100的所有奇数之和. 编写程序使用循环语句求1!+2!+3!+…+10! 编写程序输出下列N行图形使用循环语句,输出如下图案:ABBBCCCCC DDDDDD使用循环语句,输出如下图案:ABBBCCCCC DDDDDDD少了一个D 使用循环语句打印下列图形 *** * 需要for循环语句的使用讲解 用循环语句编写程序,输出如下图案:* * * * * * * * * * * * * * * * * * * * ** * * * * ** * * * ** * * ** * ** ** 编写程序,输出一下图形(要求用循环语句完成) 请使用双重循环语句编写程序,打印出如下所示图形    *         **         ***         ****         ***** 给出一个大于1的正整数a,设计一个使用for循环的程序判断这个数是否为质数用c++for语句解答 使用任意循环语句编写程序,计算1+2!+3!+4!+…+n!的和.最后以指数的形式输出 用C#语言编写:输入一个正整数n,程序打印出该整数的所有约数(不包括1和该整数本身)使用for循环语句 1、(用C语言编写程序)输入n值,输出如图所示平行四边形.(使用循环语句)当n=6时的平行四边形* * * * * ** * * * * ** * * * * ** * * * * ** * * * * ** * * * * * 循环语句中如何快速判断是使用>或是>=?rt我的意思是比如这有个for循环,循环里有数组,有时for中要使用>有时要使用>= 如何编制一个死循环的程序 在循环语句执行过程中,某个条件满足退出循环使用什么语句? C# Goto语句如何使用