can someone help me create this function
Show older comments
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 Comment
Walter Roberson
on 6 Jan 2020
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.
Accepted Answer
More Answers (2)
David Hill
on 5 Jan 2020
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
1 Comment
toufik mec
on 5 Jan 2020
David Hill
on 5 Jan 2020
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
1 Comment
toufik mec
on 5 Jan 2020
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
