Cody

Rafael S.T. Vieira

4
Rank
86
Badges
38952
Score
1 – 50 of 5,720

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

This solution will pass the test suite if you remove the offset of -pi/2, convert values to RGB, and round them to 4 decimal places.

13 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 46833. Roots, Bloody Roots: part 1/2

All problems are fixed now, sorry Ratul and Alex for any issues that you had. RGB values should be rounded to 4-decimal places. And remove NaNs from your results if present. Let me know if you still experience issues, or if you want a tip (I've fixed some of your codes, and they passed the test suite).

1 hour and 4 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 46833. Roots, Bloody Roots: part 1/2

Hi, Ratul, yes, you can use hsv2rgb function, but there seems to be a problem with the test suite. Please, wait a while, I will fix everything and update the problem description today.

1 hour and 55 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 46833. Roots, Bloody Roots: part 1/2

Thanks for the feedback, Alex. (1) The zero angle in the HSV space is given by the color red. So it is positioned on the vertical axis at the figure's center, and the angle increases counter-clockwise. (2) You are right to assume that beta is the euclidean norm, I've checked your solutions for V, and they are correct (as well as S, of course). The problem seems to be with your angle (H). I am not sure you can determine the right angle by using just asin. I believe you need to use atan, or both asin and acos to find the right angle quadrant. (3) You are right. I've forgotten to take into account the noise, sorry about that. When I was designing this problem, I was thinking about using uint8 to remove noise, but in the end, I didn't. So I will fix the test suite to consider only 4 decimal places or use uint8 and update the problem description when I'm finished.

8 hours and 9 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 1917. click away

@Alfonso And I've read the documentation of drawnow. It is only a refresh function used at several window managers. Since we are not doing animations, I don't see the point. Button's animation is way too small and fast to need a refresh. Even its other task of processing callbacks is doubtful since It may already have occured (and we cannot guaranteee it dind't). A refresh function only tries to guarantee that after it, everything is already done (and it may or may not be blocking), but it does not guarantee that all callbacks weren't executed before (it may have no work to do).

on 19 Oct 2020 at 13:11

Rafael S.T. Vieira submitted a Comment to Problem 1917. click away

@Alfonso, try doing instead 'x=msgbox('Ok'); while ishandle(x), disp('hello word!'); pause(2); end' and you will seen as soon as you click on the button the loop stops. Hope this helps. Your code does not work because as Matlab sees it, it is running the same script in the main thread, and there is no reason why the mouse button should take precedence over an infinite loop following the execution order. However, if we do use threads for instance it would be possible to close the dialog-box despite the existence of an infinite loop. My code works because I made it check the status of the dialog box since it is on the same thread. PS: Funny thing, try to click on the X-button from your message box instead of the Ok-button. Some buttons have different priorities, but the mouse click is being executed either way.

on 19 Oct 2020 at 3:09

Rafael S.T. Vieira submitted a Comment to Problem 2409. Find the Connecting Path

This problem needs to have its description improved. It is not clear why some path must prefered over another like on test case #2. Why the fours must cross at the borders when the sevens didn't? Can we only add one 1 per row? and what's the priority of paths?

on 19 Oct 2020 at 2:18

Rafael S.T. Vieira submitted a Comment to Problem 1917. click away

@Alfonso, I disagree. Clicking on the Ok button is the same thing as calling the callback function because when we click on it with a mouse button, it generates an interrupt request which causes it to be executed almost immediately https://en.wikipedia.org/wiki/Interrupt_request_(PC_architecture). This interruption tells the PC to stop everything that he is doing to handle our request, and unless some higher priority task is running, the mouse or keyboard will take the lead. I imagine that this was created like so to increase response time: so we don't have to wait for some process to finish to interact with our pcs. Rigorously, even calling a function does not guarantee it will be executed immediately, the same way that clicking on a button that calls it will not; however, the latter will probably have a higher priority. That's why we can use shortcut keys like Ctrl+Alt+Del or Command + Option + Esc to stop some slow running process (some function running for way too long). Please, check whenever possible the solutions for your problem, including the leading one. I will try once again to meet your requirements, but they are not the regular operation of a mouse click.

on 18 Oct 2020 at 5:16

Rafael S.T. Vieira submitted a Comment to Problem 46873. Sum of terms in a series 2 (★★★)

Please, do not use isqual with floats, instead use abs(x1-x2) < 1e-10 for instance. A number like 0.1 is infinite and periodic in base 2.

on 18 Oct 2020 at 4:28

Rafael S.T. Vieira submitted Solution 3259103 to Problem 46858. Remnant

on 18 Oct 2020 at 3:59

Rafael S.T. Vieira submitted Solution 3259003 to Problem 46853. Swap rows

on 18 Oct 2020 at 2:59

Rafael S.T. Vieira submitted Solution 3258988 to Problem 46868. Row avg

on 18 Oct 2020 at 2:57

Rafael S.T. Vieira submitted Solution 3258983 to Problem 46863. Row sum

on 18 Oct 2020 at 2:57

Rafael S.T. Vieira submitted Solution 3247133 to Problem 46813. Card games

on 17 Oct 2020 at 6:13

1 – 50 of 5,720