数模matlab操作
来源:互联网 发布:python在线运行 编辑:程序博客网 时间:2024/05/16 07:11
1、 建立test.m文件,基础操作示例:
%test%代表注释clear%清空所有内存变量clc%清屏clf %clear figure 消窗口syms x y;%syms 定义变量,不加";",就会在屏幕上显示此行的结果for i = 1:1:10……end
help quad<span style="white-space:pre"></span>%help integral
2、函数文件
function F = V(H)% V 为名字,H为传入参数…………F = ……end
3、代码示例
<pre name="code" class="plain">clear;clc;x = -5:0.1:5;y1 = x+10;y2 = x.^2;hold on% 原始曲线% plot(x,y1);% plot(x,y2);% 散点图% plot(x,y1,'*');% plot(x,y2,'o');% 控制横坐标、纵坐标的范围% plot(x,y1);% plot(x,y2);% axis([-10,10,-10,30]);% 加粗,变色% plot(x,y1,'linewidth',1.5);% plot(x,y2,'r');% 添加标题、横纵坐标注释% plot(x,y1);% plot(x,y2);% title('一次函数和二次函数');% xlabel('自变量x');% ylabel('因变量y');% 修改标题、横纵坐标注释的大小% plot(x,y1);% plot(x,y2);% title('一次函数和二次函数','fontsize',20);% xlabel('自变量x','fontsize',17);% ylabel('因变量y','fontsize',17);% 在曲线旁加注释% plot(x,y1);% plot(x,y2);% text(0.7,10,'\fontsize{14}\it y1 = x+10');% text(2.7,6,'\fontsize{14}\it y2 = x^2');% 添加图例注释% plot(x,y1);% plot(x,y2);% legend('\fontsize{14}\it y1=x+10','\fontsize{14}\it y2=x^2');% 图例注释的位置% plot(x,y1);% plot(x,y2);% legend('\fontsize{14}\it y1=x+10','\fontsize{14}\it y2=x^2',2);% % legend('\fontsize{14}\it y1=x+10','\fontsize{14}\it y2=x^2',3);% % legend('\fontsize{14}\it y1=x+10','\fontsize{14}\it y2=x^2',4);% 画子图% subplot(1,2,1);% plot(x,y1);% subplot(1,2,2);% plot(x,y2);% % % subplot(2,1,1);% % plot(x,y1);% % subplot(2,1,2);% % plot(x,y2);% 综合% %子图1% subplot(1,2,1);% plot(x,y1,'r*');% title('一次函数','fontsize',20);% xlabel('自变量x','fontsize',17);% ylabel('因变量y','fontsize',17);% text(0.7,10,'\fontsize{14}\it y1 = x+10');% legend('\fontsize{14}\it y1=x+10');% %子图2% subplot(1,2,2);% plot(x,y2,'linewidth',1.5);% title('二次函数','fontsize',20);% xlabel('自变量x','fontsize',17);% ylabel('因变量y','fontsize',17);% text(2.7,6,'\fontsize{14}\it y2 = x^2');% legend('\fontsize{14}\it y2=x^2');
以上主要为算法模块内容,还有很多很多内容在ppt中,以及可以百度得到。
注意使用spss求分布和Maple求积分。
0 0
- 数模matlab操作
- 数模的matlab自学准备阶段
- Matlab 数模转换时需要的算法
- 数模
- 数模
- 2011数模国赛A题部分Matlab代码
- 数模中常使用的Matlab绘图与Excel绘图
- 【数模学习】Matlab 符号微积分 计算微分、雅可比矩阵、不定积分与定积分、求解微分方程
- 数模网站
- 数模文献
- 数模问题
- 关于数模
- 数模随想
- 数模第二阶段
- 数模+lingo
- 数模论文
- Matlab一些操作技巧
- Matlab常用图像操作
- 自定义Annotation类型
- 数据结构_两个有序单链表归并C语言源代码
- Openstack 架构
- Android上方便地开发的C程序
- 判断UITextField.text 是否为空
- 数模matlab操作
- JS和JQuery扩展方法
- JavaBean计算器的实现
- RandomAccessFile 乱码问题 hpunix
- 从01背包看动态规划(特别说明几点)
- leetcode: Gas Station
- ConnectivityManager
- FPGA研发之道(7)架构设计漫谈(二)
- 红黑树的基本概念