matlab 5月17日

定积分:
syms x;
f=((x+2)^0.5-3^0.5)/(x-1);
limit(f,x,1,’left’)
syms x;
f=((2*x-1)/(2*x+1))^(x+1);
limit(f,x,0,’right’)

syms x;
f=exp(1/x);
limit(f,x,0,’left’)

求导:
syms x;
f=sin(x)+x^2;
diff(f);
pretty(ans);
syms x;
f=x*exp(x^2);
diff(f);
pretty(ans);
y=ln x / x^2 求导
syms x;
f=log(x)/(x^2);
diff(f);
pretty(ans);

syms x;
f=sin(2*x)*cos(3*x);
diff(f);
pretty(ans);
x=pi;
2*cos(2*x)*cos(3*x)-3*sin(2*x)*sin(3*x)

不定积分:
int(f);表示f的 不定积分
int(f,a,b);表示f在ab区间中的定积分

syms x;
f=3*x*sin(2*x);
int(f);
pretty(ans);

syms x;
f=exp(x)*sin(x)^2;
int(f);
pretty(ans);

syms x;
f=(1+sin(x)/1+cos(x))*exp(x);
int(f);
pretty(ans);

syms x;
f=(3*x-5)*acos(x);
int(f,0,1);
pretty(ans);

syms x;
f=(1-sin(2*x))^0.5;
int(f,0,pi/2);
pretty(ans);

syms x;
f=(1/((2*pi)^0.5));
fs=exp((-x^2)/2)
int(fs,-inf,+inf);
pretty(ans*f);
ans*f

LNMP添加、删除虚拟主机

##添加网站(虚拟主机)##

执行:lnmp vhost add

##列出网站(虚拟主机)##

执行:lnmp vhost list

##删除网站(虚拟主机)##

执行:lnmp vhost del

删除网站会先列出当前已有虚拟主机,按提示输入要删除的虚拟主机域名 回车确认。

这里只是删除虚拟主机配置文件,网站文件并不会删除需要自己删除。
LNMP 1.2下需要执行:chattr -i /网站目录/.user.ini 后才能删除网站目录。

当执行chown或chmod对网站目录属主属组或权限进行操作时可能会提示chown: changing ownership of `/home/wwwroot/default/.user.ini’: Operation not permitted,不需要理会,如果有强迫症可以参考前面先进行chattr -i的操作。

摘自:lnmp.org/faq/lnmp-vhost-add-howto.html

 

LNMP状态管理命令

LNMP状态管理命令:

LNMP 1.2状态管理: lnmp {start|stop|reload|restart|kill|status}
LNMP 1.2各个程序状态管理: lnmp {nginx|mysql|mariadb|php-fpm|pureftpd} {start|stop|reload|restart|kill|status}
Nginx状态管理:/etc/init.d/nginx {start|stop|reload|restart}
MySQL状态管理:/etc/init.d/mysql {start|stop|restart|reload|force-reload|status}
Memcached状态管理:/etc/init.d/memcached {start|stop|restart}
PHP-FPM状态管理:/etc/init.d/php-fpm {start|stop|quit|restart|reload|logrotate}
PureFTPd状态管理: /etc/init.d/pureftpd {start|stop|restart|kill|status}
ProFTPd状态管理: /etc/init.d/proftpd {start|stop|restart|reload}
如重启LNMP,输入命令:/root/lnmp restart 即可,单独重启mysql:/etc/init.d/mysql restart