メインコンテンツ

結果:


Ned Gulley
Ned Gulley
最後のアクティビティ: 2024 年 6 月 25 日

The Ans Hack is a dubious way to shave a few points off your solution score. Instead of a standard answer like this
function y = times_two(x)
y = 2*x;
end
you would do this
function ans = times_two(x)
2*x;
end
The ans variable is automatically created when there is no left-hand side to an evaluated expression. But it makes for an ugly function. I don't think anyone actually defends it as a good practice. The question I would ask is: is it so offensive that it should be specifically disallowed by the rules? Or is it just one of many little hacks that you see in Cody, inelegant but tolerable in the context of the surrounding game?
Incidentally, I wrote about the Ans Hack long ago on the Community Blog. Dealing with user-unfriendly code is also one of the reasons we created the Head-to-Head voting feature. Some techniques are good for your score, and some are good for your code readability. You get to decide with you care about.
goc3
goc3
最後のアクティビティ: 2024 年 6 月 7 日

There are a host of problems on Cody that require manipulation of the digits of a number. Examples include summing the digits of a number, separating the number into its powers, and adding very large numbers together.
If you haven't come across this trick yet, you might want to write it down (or save it electronically):
digits = num2str(4207) - '0'
That code results in the following:
digits =
4 2 0 7
Now, summing the digits of the number is easy:
sum(digits)
ans =
13
Chen Lin
Chen Lin
最後のアクティビティ: 2024 年 10 月 1 日

Hello and a warm welcome to everyone! We're excited to have you in the Cody Discussion Channel. To ensure the best possible experience for everyone, it's important to understand the types of content that are most suitable for this channel.
Content that belongs in the Cody Discussion Channel:
  • Tips & tricks: Discuss strategies for solving Cody problems that you've found effective.
  • Ideas or suggestions for improvement: Have thoughts on how to make Cody better? We'd love to hear them.
  • Issues: Encountering difficulties or bugs with Cody? Let us know so we can address them.
  • Requests for guidance: Stuck on a Cody problem? Ask for advice or hints, but make sure to show your efforts in attempting to solve the problem first.
  • General discussions: Anything else related to Cody that doesn't fit into the above categories.
Content that does not belong in the Cody Discussion Channel:
  • Comments on specific Cody problems: Examples include unclear problem descriptions or incorrect testing suites.
  • Comments on specific Cody solutions: For example, you find a solution creative or helpful.
Please direct such comments to the Comments section on the problem or solution page itself.
We hope the Cody discussion channel becomes a vibrant space for sharing expertise, learning new skills, and connecting with others.
Hans Scharler
Hans Scharler
最後のアクティビティ: 2024 年 5 月 31 日

Spring is here in Natick and the tulips are blooming! While tulips appear only briefly here in Massachusetts, they provide a lot of bright and diverse colors and shapes. To celebrate this cheerful flower, here's some code to create your own tulip!
Chen Lin
Chen Lin
最後のアクティビティ: 2024 年 6 月 9 日

Drumlin Farm has welcomed MATLAMB, named in honor of MathWorks, among ten adorable new lambs this season!
Hans Scharler
Hans Scharler
最後のアクティビティ: 2024 年 5 月 17 日

I found this plot of words said by different characters on the US version of The Office sitcom. There's a sparkline for each character from pilot to finale episode.
Chen Lin
Chen Lin
最後のアクティビティ: 2024 年 7 月 3 日

Northern lights captured from this weekend at MathWorks campus ✨
Did you get a chance to see lights and take some photos?

Hello MathWorks Community,

I am excited to announce that I am currently working on a book project centered around Matrix Algebra, specifically designed for MATLAB users. This book aims to cater to undergraduate students in engineering, where Matrix Algebra serves as a foundational element.

Matrix Algebra is not only pivotal in understanding complex engineering concepts but also in applying these principles effectively in various technological solutions. MATLAB, renowned for its powerful computational capabilities, is an excellent tool to explore and implement these concepts, making it a perfect companion for this book.

As I embark on this journey to create a resource that bridges theoretical matrix algebra with practical MATLAB applications, I am looking for one or two knowledgeable individuals who have a firm grasp of both subjects. If you have experience in teaching or applying matrix algebra in engineering contexts and are familiar with MATLAB, your contribution could be invaluable.

Collaborators will help in shaping the content to ensure it is educational, engaging, and technically robust, making complex concepts accessible and applicable for students.

If you are interested in contributing to this project or know someone who might be, please reach out to discuss how we can work together to make this book a valuable resource for engineering students.

Thank you and looking forward to your participation!

Athanasios Paraskevopoulos
Athanasios Paraskevopoulos
最後のアクティビティ: 2024 年 4 月 14 日

What's your way?
Vonny Groose
Vonny Groose
最後のアクティビティ: 2024 年 11 月 8 日

Mari is helping Dad work.
Tom Sleeper
Tom Sleeper
最後のアクティビティ: 2024 年 6 月 9 日

Today, he got dressed for work to design some new dog toy-making algorithms. #nationalpetday
RAGHUVEER RAJESH
RAGHUVEER RAJESH
最後のアクティビティ: 2024 年 4 月 11 日

Transforming my furry friend into a grayscale masterpiece with MATLAB! 🐾 #MATLABPetsDay
Hans Scharler
Hans Scharler
最後のアクティビティ: 2024 年 4 月 11 日

This is Stella while waiting to see if the code works...
Chen Lin
Chen Lin
最後のアクティビティ: 2024 年 4 月 12 日

What's the weather like in your place?
David
David
最後のアクティビティ: 2024 年 4 月 2 日

I feel like no one at UC San Diego knows this page, let alone this server, is still live. For the younger generation, this is what the whole internet used to look like :)
Image Analyst
Image Analyst
最後のアクティビティ: 2024 年 5 月 17 日

In one line of MATLAB code, compute how far you can see at the seashore. In otherwords, how far away is the horizon from your eyes? You can assume you know your height and the diameter or radius of the earth.
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos
最後のアクティビティ: 2024 年 3 月 26 日

Keep calm and study PDEs
Adam Danz
Adam Danz
最後のアクティビティ: 2024 年 12 月 26 日 13:24

David
David
最後のアクティビティ: 2024 年 3 月 26 日

A bit late. Compliments to Chris for sharing.
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos
最後のアクティビティ: 2024 年 3 月 17 日

can you relate?