工控领域经常会涉及速度加减速的算法:线性加减速,S曲线加减速(sin函数,拓展其他三角函数曲线), 贝塞尔曲线,等等。 线性加减速: 设定起始速度V0,目标速度V1,加速时间Ta(s,或加速度),这个的任务执行周期为ΔT( ms 级 或者设定定时器,定时时间必须大于任务周期否则还是按任务周期计算输出 ...
分类:
编程语言 时间:
2018-10-20 11:00:32
阅读次数:
252
从3-4: 对于永磁体产生的磁密,去任意 i 次,对于齿槽产生的周期性磁导,取任意 j 次,相当于把两个∑ 展开,将sin(θm)和cos(θm)积化和差, 得到 等式4 , 因为在 0 - 2pi 范围内,sin/cos(k*θ)的积分均为0 ,所以只有当 ip - jQs = 0时 上图四个三角 ...
分类:
其他好文 时间:
2018-10-19 15:14:22
阅读次数:
185
已知sinx的一组x,y对应关系,用拉格朗日插值法估计sin(0.3367)的值.xx0.320.340.36y0.3145670.3334870.352274//classInterpolation:def__init__(self,x,y):self.x=xself.y=ydeffunc(self,X):s=0foriinrange(len(self.x)):W=1w=(X-self.x[i]
分类:
编程语言 时间:
2018-10-18 12:27:43
阅读次数:
259
clc 清屏(只清除显示内容) clear 清除所有变量(运算结果) who 显示workspace的所有变量 whos 详细显示workspace的所有变量 help sin 显示sin函数的相关内容用法 ...
分类:
其他好文 时间:
2018-10-06 16:33:57
阅读次数:
222
#include #include int main() { int n; const double pi=acos(-1); double a,b; while(scanf("%d",&n)!=EOF) a=sin(n*pi/180); b=cos(n*pi/180); printf("%.2f\... ...
分类:
编程语言 时间:
2018-10-04 20:31:52
阅读次数:
544
1、solve() 求根 syms x; %定义x为symbol,即所求的根为x y=x*sin(x)-x; solve(y,x); %求 y=xsinx-x的根x % x-2y=5 和 x+y=6 syms x y; eq1=x-2*y-5; eq2=x+y-6; A=solve(eq1,eq2, ...
分类:
其他好文 时间:
2018-10-01 22:11:25
阅读次数:
217
#include #include const double pi=acos(-1); int main() { int s; double a,b; while(scanf("%ld",&s)!=EOF) { a=sin(s*pi/180); b=cos(s*pi/180); printf("%.... ...
分类:
编程语言 时间:
2018-09-29 00:11:02
阅读次数:
410
1 public class Singleton { 2 3 private Singleton(){ 4 //do something 5 } 6 7 private static volatile Singleton singleton = null; 8 9 public static Sin... ...
分类:
其他好文 时间:
2018-09-08 11:46:34
阅读次数:
120
8.1 Activity 8.1.1 起源 8.1.2 Activity形态 8.1.3 生命周期 8.2 Activity任务栈简介 8.3 ActivityManifest启动模式 8.3.1 standard 8.3.2 singleTop 8.3.3 singleTask 8.3.4 sin ...
分类:
移动开发 时间:
2018-09-07 14:02:47
阅读次数:
153
Math 对象 Math 对象用于执行数学任务。 使用 Math 的属性和方法的语法: 注释:Math 对象并不像 Date 和 String 那样是对象的类,因此没有构造函数 Math(),像 Math.sin() 这样的函数只是函数,不是某个对象的方法。您无需创建它,通过把 Math 作为对象使 ...
分类:
其他好文 时间:
2018-09-05 12:09:50
阅读次数:
170