Fun
フォロー



Vonny Groose
Vonny Groose
Last activity 2024 年 11 月 8 日 21:03

Mari is helping Dad work.
Stephen23
Stephen23
Last activity 2024 年 11 月 2 日 18:45

I know we have all been in that all-too-common situation of needing to inefficiently identify prime numbers using only a regular expression... and now Matt Parker from Standup Maths helpfully released a YouTube video entitled "How on Earth does ^.?$|^(..+?)\1+$ produce primes?" in which he explains a simple regular expression (aka Halloween incantation) which matches composite numbers:
Here is my first attempt using MATLAB and Matt Parker's example values:
fnh = @(n) isempty(regexp(repelem('*',n),'^.?$|^(..+?)\1+$','emptymatch'));
fnh(13)
ans = logical
1
fnh(15)
ans = logical
0
fnh(101)
ans = logical
1
fnh(1000)
ans = logical
0
Feel free to try/modify the incantation yourself. Happy Halloween!
David
David
Last activity 2024 年 9 月 12 日

In case you haven't come across it yet, @Gareth created a Jokes toolbox to get MATLAB to tell you a joke.
Image Analyst
Image Analyst
Last activity 2024 年 8 月 12 日

Imagine that the earth is a perfect sphere with a radius of 6371000 meters and there is a rope tightly wrapped around the equator. With one line of MATLAB code determine how much the rope will be lifted above the surface if you cut it and insert a 1 meter segment of rope into it (and then expand the whole rope back into a circle again, of course).
Today, he got dressed for work to design some new dog toy-making algorithms. #nationalpetday
Chen Lin
Chen Lin
Last activity 2024 年 6 月 9 日

Drumlin Farm has welcomed MATLAMB, named in honor of MathWorks, among ten adorable new lambs this season!
Hans Scharler
Hans Scharler
Last activity 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!
Image Analyst
Image Analyst
Last activity 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.
Hans Scharler
Hans Scharler
Last activity 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.
Mike Croucher
Mike Croucher
Last activity 2024 年 5 月 10 日

Paulo Silva
Paulo Silva
Last activity 2024 年 5 月 10 日

Please post the easter eggs that you have found so far if they aren't already posted by someone else.
Let's try to make a good Matlab easter egg list because it seems that there isn't one.
What should be posted:
  • Unexpected but intentional behaviour
  • Special things that the programmers left for us to discover
  • Extra code inside a function that can be used for other purposes
  • Hidden pictures and audio clips
What shouldn't be posted:
  • Repeated Easter Eggs, if someone already posted it please don't repeat
  • Bugs in functions that cause trouble and might be fixed in later versions
  • Matlab games that come with the program unless they aren't mentioned in the documentation (the games are in the other demos, try the xpbombs and fifteen, you can even see the code for both games)
What's your way?
Transforming my furry friend into a grayscale masterpiece with MATLAB! 🐾 #MATLABPetsDay
Hans Scharler
Hans Scharler
Last activity 2024 年 4 月 11 日

This is Stella while waiting to see if the code works...
Keep calm and study PDEs
David
David
Last activity 2024 年 3 月 26 日

A bit late. Compliments to Chris for sharing.
Adam Danz
Adam Danz
Last activity 2024 年 3 月 22 日

Athanasios Paraskevopoulos
Athanasios Paraskevopoulos
Last activity 2024 年 3 月 17 日

can you relate?
Athanasios Paraskevopoulos
Athanasios Paraskevopoulos
Last activity 2024 年 3 月 14 日

Can you solve it?
Share your fun photos in the comments!