if_elseif
用MATLAB写了个这样的程序
if ((0 < pwr <=2) )
wf_temp1 = round(temp_wf0/2^7);
elseif( (2 < pwr<= 4) )
wf_temp1 = round(temp_wf0/2^8);
elseif((4 < pwr <= 8))
wf_temp1 = round(temp_wf0/2^9);
Else
wf_temp1 = round(temp_wf0/2^10);
end
但是程序好像不能执行,改成下面才可以的。
if ((0 < pwr)&&(pwr <=2) )
wf_temp1 = round(temp_wf0/2^8);
elseif( (2 < pwr)&&( pwr<= 4) )
wf_temp1 = round(temp_wf0/2^9);
else((4 < pwr)&&( pwr <= 8))
wf_temp1 = round(temp_wf0/2^10);
end
if_elseif的更多相关文章
随机推荐
- 行矩阵列矩阵D3D&GL&U3D
void Start () { //矩阵函数原型:Matrix4x4(Vector4 colum0, Vector4 colum1, Vector4 colum2, Vector4 colum3),这 ...
- Hibernate hql 多表查询
String hql="select c from Col c ,UserRole role where c.id=role.columnId and c.id=? and role.use ...
- How to Pronounce EVERY
How to Pronounce EVERY Share Tweet Share Tagged With: 2-Syllable Everybody should learn the word ‘ev ...
- Layouts
[Layouts] Each layout file must contain exactly one root element, which must be a View or ViewGroup ...
- HTML的基础知识
1.什么是HTML? html是一种,用来描述网页的一种语言,指的是一种超文本编辑语言,他不是一种编程的语言,而是一种标记的语言,包含:静态HTML和动态的HTML: 2.学习推荐的网站: http: ...
- avg(xxxxxx)什么时候能独自出现?
avg(xxxxxx)是作为求一组数据的平均数,需要有这组数据的总数和个数,所以通常配合着group by来使用, 比如: SELECT ID, AVG(GRADE) AS 平均数 FROM TEST ...
- SpringCloud 简单理解
0.SpringCloud,微服务架构.包括 服务发现(Eureka),断路器(Hystrix),服务网关(Zuul),客户端负载均衡(Ribbon).服务跟踪(Sleuth).消息总线(Bus).消 ...
- 基于Python Shell获取hostname和fqdn释疑
一直以来被Linux的hostname和fqdn(Fully Qualified Domain Name)困惑了好久,今天专门抽时间把它们的使用细节弄清了. 一.设置hostname/fqdn 在Li ...
- [leetcode]543. Diameter of Binary Tree二叉树直径
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a b ...
- 2-Qt关闭子窗口时执行特定代码
https://blog.csdn.net/naibozhuan3744/article/details/82689434 本文主要总结在关闭qt的QWidget子窗口瞬间,执行特定代码.由于主窗口关 ...