Cody

Rafael S.T. Vieira

3
Rank
93
Badges
41818
Score
51 – 100 of 6,282

Rafael S.T. Vieira submitted a Comment to Solution 48055

Alfonso's solution suffers from the same problem of precision apparently. Using isequal requires that one does the exact same operation that you did (to obain the exact same error*), and closes the door for alternative or smaller solutions. * Floating-point numbers have some precision problems: the classic example is 0.1 which becomes an infinite number as a binary.

on 10 Nov 2020 at 17:50

Rafael S.T. Vieira submitted a Comment to Problem 378. Inhomogenous Depth Scale Interpolation

Please, bmtran, don't use isequal with floats, prefer to use abs(a-b) < tol. Unless I use the function interp1 exactly like you did, my solution cannot pass the test suite. Please try my commented code (and the difference between the solutions is at the order of 1e-15).

on 10 Nov 2020 at 2:10

Rafael S.T. Vieira submitted a Comment to Problem 586. All Humans are Created Equal - Pareto Equality

I've solved it, but I am not sure it is right. Solutions to this problem seem to be case-oriented and probably not what the author expected. I believe the last case is wrong, for instance, but it depends on the criteria used (what is the preference of each set? is it to be ordered?). Moreover, the Wikipedia article displays a weighted sum. Still, the author doesn't mention weights or how they should be added, anyway...good luck to future challengers.

on 9 Nov 2020 at 22:42

Rafael S.T. Vieira liked Problem 44510. Besson Ranks

on 9 Nov 2020 at 12:57

Rafael S.T. Vieira submitted a Comment to Problem 42810. String Find with Wildcards of a Cell array

By looking at the solutions, you should probably add a case c = {'data.mat', 'amat', 'repo.mat', 'matrix', '.mat'} str = '*.mat'

on 8 Nov 2020 at 23:09

Rafael S.T. Vieira liked Problem 1532. SLP Calculation

on 8 Nov 2020 at 17:39

Rafael S.T. Vieira submitted a Comment to Problem 47420. Falling on the Moon.

Thank you, Daniele.

on 8 Nov 2020 at 16:00

Rafael S.T. Vieira submitted a Comment to Solution 3579535

I am trying :)

on 8 Nov 2020 at 4:30

Rafael S.T. Vieira submitted a Comment to Problem 421. Multiply to the limit?

My solution is the longest, and I followed James' tip. My tip is that there is a MATLAB function (Elementary Math) that computes this value with one call (no loops are required).

on 8 Nov 2020 at 0:47

Rafael S.T. Vieira submitted a Comment to Problem 47420. Falling on the Moon.

please fix, your test suite. For instance h = 1.5; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct = 1.3608)) Should be h = 1.5; y_correct = 1; assert(isequal(your_fcn_name(x),1.3608))

on 7 Nov 2020 at 22:44

Rafael S.T. Vieira submitted a Comment to Problem 47335. arrayfun bomb

What is a bomb array? I've solved it again, but I am not sure that it is what you want.

on 7 Nov 2020 at 22:23

Rafael S.T. Vieira liked Problem 47335. arrayfun bomb

on 7 Nov 2020 at 22:22

51 – 100 of 6,282