can someone help me create this function
이전 댓글 표시
Can some one create matlab code for this function? I want the answers of f from 0 to 100.
m= 0 to 5.
n= 0 to 5.
r= 0 to 5 (whole numbers only)
There is one condition : m and n and r never equal 0 at the same time. If first and second = 0 the third never equal to 0
댓글 수: 1
Walter Roberson
2020년 1월 6일
Our policy is that we do not close Questions that have a meaningful attempt at an Answer -- not unless the Question was abusive or violated legal constraints.
채택된 답변
추가 답변 (2개)
David Hill
2020년 1월 5일
count=0;
for m=0:5
for n=0:5
for r=0:5
if r+m+n==0
break;
end
count=count+1;
f(count)=170*sqrt(m^2/61.6225 + n^2/39.0625 + r^2/24.5025);
end
end
end
end
David Hill
2020년 1월 5일
count=0;
for m=0:5
for n=0:5
for r=0:5
if r+m+n==0
continue;
end
t=170*sqrt(m^2/61.6225 + n^2/39.0625 + r^2/24.5025);
if t >= 0 && t <= 100
count=count+1;
f(count,:)=[m,n,r,t];
end
end
end
end
카테고리
도움말 센터 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

