メインコンテンツ

Results for


Dear contest participants,
The 2024 Community Contest—MATLAB Shorts Mini Hack—is just one week away! Last year, we challenged you to create a 48-frame, 2-second animation. This year, we're doubling the fun by increasing the frame count to 96 and adding audio support. Your mission? Create a short movie!
As always, whether you are a seasoned MATLAB user or just a beginner, you can participate in the contest and have opportunities to win amazing prizes.
Timeframe:
  • The contest will run for 5 weeks, from Oct. 7th to Nov. 10th, Eastern Time.
General Rules:
  • The first week is dedicated to entry creation, and the fifth week is reserved for voting only.
  • Create a 96-frame, 4-second animation and add audio. We will loop it 3 times to create a 12-second short movie for you.
  • The character limit remains at 2,000 characters.
Prizes
  • You will have opportunities to win compelling prizes, including Amazon gift cards, MathWorks T-shirts, and virtual badges. We will give out both weekly prizes and grand prizes.
Warm-up!
With one week left before the contest begins, we recommend you warm up by reading a fantastic article: Walkthrough: making Little Nemo's airship in MATLAB by @Tim. The article shares both technical insights and the challenges encountered along the way.
We look forward to seeing all of you in the 2024 MATLAB Shorts Mini Hack.
The MATLAB Central Community Team
Local large language models (LLMs), such as llama, phi3, and mistral, are now available in the Large Language Models (LLMs) with MATLAB repository through Ollama™!
Read about it here:
Mike Croucher
Mike Croucher
Last activity 2024 年 9 月 15 日

Hot off the heels of my High Performance Computing experience in the Czech republic, I've just booked my flights to Atlanta for this year's supercomputing conference at SC24.
Will any of you be there?
John D'Errico
John D'Errico
Last activity 2024 年 11 月 8 日 14:47

syms u v
atan2alt(v,u)
ans = 
function Z = atan2alt(V,U)
% extension of atan2(V,U) into the complex plane
Z = -1i*log((U+1i*V)./sqrt(U.^2+V.^2));
% check for purely real input. if so, zero out the imaginary part.
realInputs = (imag(U) == 0) & (imag(V) == 0);
Z(realInputs) = real(Z(realInputs));
end
As I am editing this post, I see the expected symbolic display in the nice form as have grown to love. However, when I save the post, it does not display. (In fact, it shows up here in the discussions post.) This seems to be a new problem, as I have not seen that failure mode in the past.
You can see the problem in this Answer forum response of mine, where it did fail.
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.
Chen Lin
Chen Lin
Last activity 2024 年 9 月 12 日

Dear MATLAB contest enthusiasts,
In the 2023 MATLAB Mini Hack Contest, Tim Marston captivated everyone with his incredible animations, showcasing both creativity and skill, ultimately earning him the 1st prize.
We had the pleasure of interviewing Tim to delve into his inspiring story. You can read the full interview on MathWorks Blogs: Community Q&A – Tim Marston.
Last question: Are you ready for this year’s Mini Hack contest?
goc3
goc3
Last activity 2024 年 11 月 11 日 13:56

I was browsing the MathWorks website and decided to check the Cody leaderboard. To my surprise, William has now solved 5,000 problems. At the moment, there are 5,227 problems on Cody, so William has solved over 95%. The next competitor is over 500 problems behind. His score is also clearly the highest, approaching 60,000.
Please take a moment to congratulate @William.
Has this been eliminated? I've been at 31 or 32 for 30 days for awhile, but no badge. 10 badge was automatic.

Formal Proof of Smooth Solutions for Modified Navier-Stokes Equations

1. Introduction

We address the existence and smoothness of solutions to the modified Navier-Stokes equations that incorporate frequency resonances and geometric constraints. Our goal is to prove that these modifications prevent singularities, leading to smooth solutions.

2. Mathematical Formulation

2.1 Modified Navier-Stokes Equations

Consider the Navier-Stokes equations with a frequency resonance term R(u,f)\mathbf{R}(\mathbf{u}, \mathbf{f})R(u,f) and geometric constraints:

∂u∂t+(u⋅∇)u=−∇pρ+ν∇2u+R(u,f)\frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u} \cdot \nabla) \mathbf{u} = -\frac{\nabla p}{\rho} + \nu \nabla^2 \mathbf{u} + \mathbf{R}(\mathbf{u}, \mathbf{f})∂t∂u​+(u⋅∇)u=−ρ∇p​+ν∇2u+R(u,f)

where:

• u=u(t,x)\mathbf{u} = \mathbf{u}(t, \mathbf{x})u=u(t,x) is the velocity field.

• p=p(t,x)p = p(t, \mathbf{x})p=p(t,x) is the pressure field.

• ν\nuν is the kinematic viscosity.

• R(u,f)\mathbf{R}(\mathbf{u}, \mathbf{f})R(u,f) represents the frequency resonance effects.

• f\mathbf{f}f denotes external forces.

2.2 Boundary Conditions

The boundary conditions are:

u⋅n=0 on Γ\mathbf{u} \cdot \mathbf{n} = 0 \text{ on } \Gammau⋅n=0 on Γ

where Γ\GammaΓ represents the boundary of the domain Ω\OmegaΩ, and n\mathbf{n}n is the unit normal vector on Γ\GammaΓ.

3. Existence and Smoothness of Solutions

3.1 Initial Conditions

Assume initial conditions are smooth:

u(0)∈C∞(Ω)\mathbf{u}(0) \in C^{\infty}(\Omega)u(0)∈C∞(Ω) f∈L2(Ω)\mathbf{f} \in L^2(\Omega)f∈L2(Ω)

3.2 Energy Estimates

Define the total kinetic energy:

E(t)=12∫Ω∣u(t)∣2 dΩE(t) = \frac{1}{2} \int_{\Omega} \mathbf{u}(t)^2 \, d\OmegaE(t)=21​∫Ω​∣u(t)∣2dΩ

Differentiate E(t)E(t)E(t) with respect to time:

dE(t)dt=∫Ωu⋅∂u∂t dΩ\frac{dE(t)}{dt} = \int_{\Omega} \mathbf{u} \cdot \frac{\partial \mathbf{u}}{\partial t} \, d\OmegadtdE(t)​=∫Ω​u⋅∂t∂u​dΩ

Substitute the modified Navier-Stokes equation:

dE(t)dt=∫Ωu⋅[−∇pρ+ν∇2u+R] dΩ\frac{dE(t)}{dt} = \int_{\Omega} \mathbf{u} \cdot \left[ -\frac{\nabla p}{\rho} + \nu \nabla^2 \mathbf{u} + \mathbf{R} \right] \, d\OmegadtdE(t)​=∫Ω​u⋅[−ρ∇p​+ν∇2u+R]dΩ

Using the divergence-free condition (∇⋅u=0\nabla \cdot \mathbf{u} = 0∇⋅u=0):

∫Ωu⋅∇pρ dΩ=0\int_{\Omega} \mathbf{u} \cdot \frac{\nabla p}{\rho} \, d\Omega = 0∫Ω​u⋅ρ∇p​dΩ=0

Thus:

dE(t)dt=−ν∫Ω∣∇u∣2 dΩ+∫Ωu⋅R dΩ\frac{dE(t)}{dt} = -\nu \int_{\Omega} \nabla \mathbf{u}^2 \, d\Omega + \int_{\Omega} \mathbf{u} \cdot \mathbf{R} \, d\OmegadtdE(t)​=−ν∫Ω​∣∇u∣2dΩ+∫Ω​u⋅RdΩ

Assuming R\mathbf{R}R is bounded by a constant CCC:

∫Ωu⋅R dΩ≤C∫Ω∣u∣ dΩ\int_{\Omega} \mathbf{u} \cdot \mathbf{R} \, d\Omega \leq C \int_{\Omega} \mathbf{u} \, d\Omega∫Ω​u⋅RdΩ≤C∫Ω​∣u∣dΩ

Applying the Poincaré inequality:

∫Ω∣u∣2 dΩ≤Const⋅∫Ω∣∇u∣2 dΩ\int_{\Omega} \mathbf{u}^2 \, d\Omega \leq \text{Const} \cdot \int_{\Omega} \nabla \mathbf{u}^2 \, d\Omega∫Ω​∣u∣2dΩ≤Const⋅∫Ω​∣∇u∣2dΩ

Therefore:

dE(t)dt≤−ν∫Ω∣∇u∣2 dΩ+C∫Ω∣u∣ dΩ\frac{dE(t)}{dt} \leq -\nu \int_{\Omega} \nabla \mathbf{u}^2 \, d\Omega + C \int_{\Omega} \mathbf{u} \, d\OmegadtdE(t)​≤−ν∫Ω​∣∇u∣2dΩ+C∫Ω​∣u∣dΩ

Integrate this inequality:

E(t)≤E(0)−ν∫0t∫Ω∣∇u∣2 dΩ ds+CtE(t) \leq E(0) - \nu \int_{0}^{t} \int_{\Omega} \nabla \mathbf{u}^2 \, d\Omega \, ds + C tE(t)≤E(0)−ν∫0t​∫Ω​∣∇u∣2dΩds+Ct

Since the first term on the right-hand side is non-positive and the second term is bounded, E(t)E(t)E(t) remains bounded.

3.3 Stability Analysis

Define the Lyapunov function:

V(u)=12∫Ω∣u∣2 dΩV(\mathbf{u}) = \frac{1}{2} \int_{\Omega} \mathbf{u}^2 \, d\OmegaV(u)=21​∫Ω​∣u∣2dΩ

Compute its time derivative:

dVdt=∫Ωu⋅∂u∂t dΩ=−ν∫Ω∣∇u∣2 dΩ+∫Ωu⋅R dΩ\frac{dV}{dt} = \int_{\Omega} \mathbf{u} \cdot \frac{\partial \mathbf{u}}{\partial t} \, d\Omega = -\nu \int_{\Omega} \nabla \mathbf{u}^2 \, d\Omega + \int_{\Omega} \mathbf{u} \cdot \mathbf{R} \, d\OmegadtdV​=∫Ω​u⋅∂t∂u​dΩ=−ν∫Ω​∣∇u∣2dΩ+∫Ω​u⋅RdΩ

Since:

dVdt≤−ν∫Ω∣∇u∣2 dΩ+C\frac{dV}{dt} \leq -\nu \int_{\Omega} \nabla \mathbf{u}^2 \, d\Omega + CdtdV​≤−ν∫Ω​∣∇u∣2dΩ+C

and R\mathbf{R}R is bounded, u\mathbf{u}u remains bounded and smooth.

3.4 Boundary Conditions and Regularity

Verify that the boundary conditions do not induce singularities:

u⋅n=0 on Γ\mathbf{u} \cdot \mathbf{n} = 0 \text{ on } \Gammau⋅n=0 on Γ

Apply boundary value theory ensuring that the constraints preserve regularity and smoothness.

4. Extended Simulations and Experimental Validation

4.1 Simulations

• Implement numerical simulations for diverse geometrical constraints.

• Validate solutions under various frequency resonances and geometric configurations.

4.2 Experimental Validation

• Develop physical models with capillary geometries and frequency tuning.

• Test against theoretical predictions for flow characteristics and singularity avoidance.

4.3 Validation Metrics

Ensure:

• Solution smoothness and stability.

• Accurate representation of frequency and geometric effects.

• No emergence of singularities or discontinuities.

5. Conclusion

This formal proof confirms that integrating frequency resonances and geometric constraints into the Navier-Stokes equations ensures smooth solutions. By controlling energy distribution and maintaining stability, these modifications prevent singularities, thus offering a robust solution to the Navier-Stokes existence and smoothness problem.

J.K043006
J.K043006
Last activity 2024 年 8 月 29 日

I've been working on some matrix problems recently(Problem 55225)
and this is my code
It turns out that "Undefined function 'corr' for input arguments of type 'double'." However, should't the input argument of "corr" be column vectors with single/double values? What's even going on there?
Matthew Rademacher
Matthew Rademacher
Last activity 2024 年 8 月 19 日

So generally I want to be using uifigures over figures. For example I really like the tab group component, which can really help with organizing large numbers of plots in a manageable way. I also really prefer the look of the progress dialog, uialert, confirm, etc. That said, I run into way more bugs using uifigures. I always get a “flicker” in the axes toolbar for example. I also have matlab getting “hung” a lot more often when using uifigures.

So in general, what is recommended? Are uifigures ever going to fully replace traditional figures? Are they going to become more and more robust? Do I need a better GPU to handle graphics better? Just looking for general guidance.

Salam Surjit
Salam Surjit
Last activity 2024 年 11 月 3 日 12:49

Hi everyone, I am from India ..Suggest some drone for deploying code from Matlab.
Zahraa
Zahraa
Last activity 2024 年 8 月 14 日

Hello :-) I am interested in reading the book "The finite element method for solid and structural mechanics" online with somebody who is also interested in studying the finite element method particularly its mathematical aspect. I enjoy discussing the book instead of reading it alone. Please if you were interested email me at: student.z.k@hotmail.com Thank you!
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).
David
David
Last activity 2024 年 8 月 8 日

A library of runnable PDEs. See the equations! Modify the parameters! Visualize the resulting system in your browser! Convenient, fast, and instructive.
supercomputers
supercomputers
Last activity 2024 年 11 月 6 日 1:25

hello i found the following tools helpful to write matlab programs. copilot.microsoft.com chatgpt.com/gpts gemini.google.com and ai.meta.com. thanks a lot and best wishes.

Hi everyone,

I've recently joined a forest protection team in Greece, where we use drones for various tasks. This has sparked my interest in drone programming, and I'd like to learn more about it. Can anyone recommend any beginner-friendly courses or programs that teach drone programming?

I'm particularly interested in courses that focus on practical applications and might align with the work we do in forest protection. Any suggestions or guidance would be greatly appreciated!

Thank you!

I have picked the title but don't know which direction to take it. Looking for any and all inspiration. I took the project as it sounded interesting when reading into it, but I'm a satellite novice, and my degree is in electronics.
Muhammad
Muhammad
Last activity 2024 年 8 月 26 日

"What are your favorite features or functionalities in MATLAB, and how have they positively impacted your projects or research? Any tips or tricks to share?