can someone help me create this function
Ältere Kommentare anzeigen
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 Kommentar
Walter Roberson
am 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.
Akzeptierte Antwort
Weitere Antworten (2)
David Hill
am 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 Kommentar
toufik mec
am 5 Jan. 2020
David Hill
am 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 Kommentar
toufik mec
am 5 Jan. 2020
Kategorien
Mehr zu Data Type Identification finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

