how to write matlab code
显示 更早的评论
I need to write matlab code to display number 20-50 except number that divisibility by 4 and 5 .How can i do it
2 个评论
Alex Mcaulley
2019-4-3
Thinking...
doc mod
Image Analyst
2021-7-18
Do you want to print out, using fprintf()
- numbers that are not divisible by either 4 or 5
- numbers that are not divisible by 4 and also not divisible by 5?
Those are different things. Or do you mean that the numbers you print out must be divisible by 4 and/or 5. That is yet a different thing.
采纳的回答
更多回答(2 个)
Torsten
2019-4-3
0 个投票
N=20:50
A = setdiff(N,N(mod(N,4)==0 & mod(N,5)==0))
Basher Alnour
2021-7-18
Q1
numer = [2 -9/4 0.5];
d = conv([1 -0.5],[1 -1]);
deno = conv(d,[1 -0.25]);
[R P K] = residue(numer,deno)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!