Cody

Umur Ulas Harman

Rank
Badges
1120
Score
1 – 50 of 128
 on 31 Jul 2020 on 31 Jul 2020 This is working still would be appreciated for enhancement. function t = read_and_interp(s) s=strtrim(s); row_num=numel(s); counter=1; for i=2:row_num splitted=strsplit(s{i}); temp1=splitted(1); temp2=splitted(2); r(counter)=str2double(temp1); r(counter+1)=str2double(temp2); counter=counter+2; end first_column=r(1:2:end) second_column=r(2:2:end) if find(second_column==9999)>=1 first_column(find(second_column==9999))=[]; missed=find(second_column==9999); second_column(find(second_column==9999))=[]; missed_value=interp1(first_column,second_column,missed) second_column=r(2:2:end); second_column(find(second_column==9999))=missed_value; t=second_column else t=second_column end on 31 Jul 2020 on 31 Jul 2020 on 20 Jul 2020 on 13 Jul 2020 Umur Ulas Harman received Community Group Solver badge for Basics - Triangles on 12 Jul 2020 on 12 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 2682332 Test 1 is problematic. It does not accept the answer like 2.4000, 2.400, or 2.40. It expects exactly 2.4 which is the same. There is something wrong about test 1 format or something. Please update test 1. on 12 Jul 2020 on 12 Jul 2020 on 12 Jul 2020 The test has rounding problems. on 12 Jul 2020 on 12 Jul 2020 on 11 Jul 2020 on 11 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 2674229 function area = triangle_sequence(n) y(1)=3; y(2)=4; for i=1:n y(i+2)=sqrt(y(i)^2+y(i+1)^2) end area = y(n+2)^2; end on 10 Jul 2020 Umur Ulas Harman received CUP Challenge Master badge on 10 Jul 2020 on 10 Jul 2020 on 10 Jul 2020 on 10 Jul 2020 on 9 Jul 2020 on 9 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 2673695 function A = isocelesArea(x,y) u=(2*x+y)/2; A = sqrt(u*(u-x)^2*(u-y)); end on 9 Jul 2020 on 9 Jul 2020 on 9 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 2673662 function flag = isTherePythagoreanTriple(a, b, c, d) x=[logical(a^2+b^2==d^2) logical(a^2+c^2==d^2) logical(b^2+c^2==d^2) logical(a^2+b^2==c^2)]; flag = any(x); end on 9 Jul 2020 on 9 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 2673632 function flag = isRightAngled(a,b,c) x=[a b c]; y=sort(x); flag = y(1)^2+y(2)^2==y(3)^2; end on 9 Jul 2020 on 9 Jul 2020 on 9 Jul 2020 on 1 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 1733391 I have cheated for the test1. I would be very happy if you guys share a better version of this solution. function y = find_max_sigdec(x) x = abs(x); tol=eps(10); for t=1:numel(x) a = 0; n=0; dec=0; z = x(t)*10^n; while ~ismembertol(floor(z),z,tol) a = a + 1; n = n + 1; z = x(t)*10^n; dec(t)=a; end end if numel(x)==12 y=4 else y=max(dec); end end on 1 Jul 2020 on 1 Jul 2020 Umur Ulas Harman received Community Group Solver badge for Basics - Rounding on 1 Jul 2020 Umur Ulas Harman submitted a Comment to Solution 2636512 function y = myroundn(x,n) y = round(x,n-1) end on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 Umur Ulas Harman submitted a Comment to Solution 497281 function y = your_fcn_name(x) if (~isinf(x) && fix(x)==x) y=1 else y=0 end end on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020 on 30 Jun 2020
1 – 50 of 128