업데이트된 토론

Jerry
Jerry
최근 활동: 약 한 시간 전

Hello everyone,
I am working with the STM32H735G-DK Discovery Kit (which has a 480x272 TFT LCD with capacitive touch). I would like to know how to interface the display using Simulink.
  • I have already installed MATLAB, Simulink, Embedded Coder, and the Embedded Coder Support Package for STM32.
  • My next goal is to show data (for example, a counter or sensor value) on the display.
Questions:
  1. Does Simulink directly support the LTDC/TFT LCD on STM32H735G-DK?
  2. If not, what is the recommended workflow? Should I combine Simulink-generated code with a TouchGFX project in STM32CubeIDE?
  3. Are there any example projects or documentation on integrating Simulink with TouchGFX for display applications?
Any guidance, references, or example workflows would be very helpful.
Thank you!
Independent researcher: Nguyễn Khánh Tùng
ORCID: 0009-0002-9877-4137
Email: traiphieu.com@gmail.com
Abstract
Every fundamental law of physics has a characteristic quantity and a unit of measurement (e.g., Newton for force, Joule for energy). The NKTg Law (Law of Varying Inertia) introduces a new physical quantity — varying inertia — defined by the interaction between position, velocity, and mass.
To measure this new quantity, I propose the NKTm unit, verified with NASA JPL Horizons data (Neptune, 2023–2024). Results indicate that NKTm is an independent fundamental unit, comparable in significance to Newton, Pascal, Joule, and Watt, with applications in astronomy, aerospace, and engineering.
This article clarifies the measurement unit of the NKTg Law (NKTm) and highlights its applications, many of which I have already implemented and shared as code examples on MATLAB Central.
1. Theoretical Basis
The NKTg Law describes motion under the combined effect of position (x), velocity (v), and mass (m):
NKTg=f(x,v,m)
Two expressions define varying inertia:
  • NKTg₁ = x·p (Position–Momentum interaction)
  • NKTg₂ = (dm/dt)·p (Mass-variation–Momentum interaction)
Both are measured by the same unit: NKTm.2. Dimensional Analysis
  • From NKTg₁: [ML2/T][M·L²/T][ML2/T]
  • From NKTg₂: [M2L/T2][M²·L/T²][M2L/T2]
Thus, NKTm is a unique unit that can take different dimensional forms depending on which component dominates.
For comparison:
QuantityUnitDimensionForceNewton (N)[M·L/T²]EnergyJoule (J)[M·L²/T²]PowerWatt (W)[M·L²/T³]Varying inertia (NKTg₁)NKTm[M·L²/T]Varying inertia (NKTg₂)NKTm[M²·L/T²]
3. Verification with NASA Data (Neptune, 2023–2024)
  • Position (x): 4.498×1094.498 \times 10^94.498×109 km
  • Velocity (v): 5.43 km/s
  • Mass (m): 1.0243×10261.0243 \times 10^{26}1.0243×1026 kg
  • Momentum (p = m·v): 5.564×10265.564 \times 10^{26}5.564×1026 kg·m/s
Results:
  • NKTg₁ = x·p ≈ 2.503 × 10³⁶ NKTm
  • NKTg₂ ≈ -1.113 × 10²² NKTm (assumed micro gas escape)
  • Total NKTg ≈ 2.501 × 10³⁶ NKTm
4. Applications
  • Astronomy: describe planetary mass variation, star/galaxy formation, and long-term orbital stability.
  • Aerospace: optimize rocket fuel usage, account for mass leakage, design ion/plasma engines.
  • Earth sciences: analyze GRACE-FO data, model ice melting, sea-level rise, and mass redistribution.
  • Engineering: variable-mass robotics, cargo systems, vibration analysis, fluid/particle simulations.
👉 Many of these applications are already available as MATLAB code examples that I have uploaded to MATLAB Central, showing how NKTm can be computed and applied in practice.5. Scientific Significance
  • Establishes a new fundamental unit (NKTm), independent of Newton and Joule.
  • Provides a theoretical framework for variable-mass dynamics, beyond Newton and Einstein.
  • Supports accurate computation and simulation of real-world systems with mass variation.
Conclusion
The introduction of the NKTm unit demonstrates that varying inertia is a measurable, independent physical quantity. Like Newton or Joule, NKTm lays the foundation for a new reference system in physics, with applications ranging from planetary mechanics to modern space technology.
This article not only clarifies the measurement standard of the NKTg Law, but also connects directly with practical MATLAB implementations for simulation and verification.
Discussion prompt:
What do you think about introducing a new physical unit like NKTm? Could it be integrated into MATLAB-based simulation frameworks for variable-mass systems?
You can refer to the following four related articles to gain a deeper understanding of the NKTg Law and its applications
Inertia: A Millennia-Long Journey
Inertia, the ability to maintain an object’s motion, has existed since ancient times. Aristotle viewed motion as an inherent property; an object stops only when the force disappears. For thousands of years, inertia remained an abstract concept, impossible to measure.
Galileo and Newton initiated a revolutionary leap. Newton defined inertia through the first law, but humans could only measure mass indirectly. In modern physics, inertia exists more in theory than in experiment; it is still not directly quantifiable.
NKTg Law: A Great Leap in Quantifying Inertia
NKTg Law – the Law of Varying Inertia allows for the measurement of inertia. Inertia becomes a variable quantity, depending on position, velocity, and mass:
NKTg=f(x,v,m)
NKTg₁ = x × p
NKTg₂ = (dm/dt) × p
With the NKTm unit, inertia becomes a measurable entity, both theoretical and practical. NKTm is the bridge between classical thinking and modern experimentation, enabling simulation, calculation, and deployment across all physical and engineering systems.
NKTg Law is implemented in 150 leading programming languages, from Python, C++, Java, MATLAB, R, Swift, Go to PL/I, PL/SQL, ASP.NET, Assembly. This enables:
  • Support for all software ecosystems, from desktop to web and mobile.
  • Direct integration with inertia-measuring sensors.
  • Simulation of objects from fundamental particles to planets and galaxies on a unified algorithmic platform.
Core Library & API: Global Knowledge of Inertia
Another historic advancement is the implementation of NKTg Law in 150 leading programming languages. From Python, C++, Java, MATLAB, R, Lua, Swift, Go to rarer languages like PL/I, PL/SQL, ASP.NET, Assembly, or COBOL, NKTg Law becomes a common language for modern simulation and computation systems.
This wide deployment allows:
  • Support for all software ecosystems, from desktop, server, to web and mobile.
  • Direct integration with sensors to measure inertia experimentally.
  • Easy simulation of objects, from fundamental particles to planets and galaxies, on the same algorithmic platform.
This is supported by the Core library & API of NKTg Law on GitHub: https://github.com/NKTgLaw/NKTgLaw, which provides:
  • Core implementation: core algorithms for calculating varying inertia,
  • REST/gRPC API: access to inertia data and system integration,
  • 150+ client wrappers: deployment support for over 150 programming languages, from infrastructure to application, from physics simulation to robotics, aviation, and astronomy.
The MATLAB language is also implemented in the Core library & API of the NKTg Law at https://github.com/NKTgLaw/NKTgLaw/tree/main/clients/matlab.
Thus, NKTg Law becomes a global digital science platform, where inertia is no longer a theoretical concept but data that can be analyzed, shared, and applied instantly.
Historical Significance and Cosmic Vision
Quantifying inertia is a milestone of knowledge, leading humanity into a new era of understanding the universe. With NKTg Law, NKTm, 150 programming languages, and sensor systems:
  • Inertia can be measured directly, no longer an abstract unknown.
  • All motion models – from elementary particles to galaxies – can be simulated and predicted accurately.
  • Understanding of nature and the universe enters a new era, where intrinsic properties of objects become scientific data.
Inertia, once theoretical, is now a numerical entity, opening doors for humanity to explore and understand the universe more deeply.
Conclusion
From Aristotle to Newton and modern physics, inertia has always been an abstract concept, not directly measurable. Thanks to NKTg Law and NKTm, along with 150 programming languages and sensor devices, inertia is now a practical measurable quantity, ushering in a new era of universal understanding, transforming physical knowledge from theory to data, from abstraction to measurement, from reasoning to discovery.
For some time now, this has been bugging me - so I thought to gather some more feedback/information/opinions on this.
What would you classify Recursion? As a loop or as a vectorized section of code?
For context, this query occured to me while creating Cody problems involving strict (so to speak) vectorization - (Everyone is more than welcome to check my recent Cody questions).
To make problems interesting and/or difficult, I (and other posters) ban functions and functionalities - such as for loops, while loops, if-else statements, arrayfun() and the rest of the fun() family functions. However, some of the solutions including the reference solution I came up with for my latest problem, contained recursion.
I am rather divided on how to categorize it. What do you think?
Mike Croucher
Mike Croucher
최근 활동: 약 2시간 전

all(logical.empty)
ans = logical
1
Discuss!
Steve Eddins
Steve Eddins
최근 활동: 2025년 9월 29일 11:11

In 2019, I wrote a MATLAB Central blog post called "The tool builder's gene (or how to get a job at MathWorks)." In it, I explained my personal theory of a characteristic of some engineers that is key for becoming successful software developers at MathWorks.
I just shared this essay on my personal blog, along with a couple of updates.
Walter Roberson
Walter Roberson
최근 활동: 2025년 9월 28일 22:40

This topic is for discussing highlights to the current R2025a Pre-release.
Hey cody fellows :-) !
I recently created two problem groups, but as you can see I struggle to set their cover images :
What is weird given :
  • I already did it successfully twice in the past for my previous groups ;
  • If you take one problem specifically, Problem 60984. Mesh the icosahedron for instance, you can normally see the icon of the cover image in the top right hand corner, can't you ?
  • I always manage to set cover images to my contributions (mostly in the filexchange).
I already tried several image formats, included .png 4/3 ratio, but still the cover images don't set.
Could you please help me to correctly set my cover images ?
Thank you.
Nicolas
Apparently, the back end here is running 2025b, hovering over the Run button and the Executing In popup both show R2024a.
ver matlab
------------------------------------------------------------------------------------------------- MATLAB Version: 25.2.0.2998904 (R2025b) MATLAB License Number: 40912989 Operating System: Linux 6.8.0-1019-aws #21~22.04.1-Ubuntu SMP Thu Nov 7 17:33:30 UTC 2024 x86_64 Java Version: Java 1.8.0_292-b10 with AdoptOpenJDK OpenJDK 64-Bit Server VM mixed mode ------------------------------------------------------------------------------------------------- MATLAB Version 25.2 (R2025b)
Independent researcher: Nguyễn Khánh Tùng
ORCID: 0009-0002-9877-4137
Email: traiphieu.com@gmail.com
The NKTg Law (Law of Variable Inertia) not only holds value in physics but also opens up wide possibilities for applications in programming and simulation. The remarkable point here is that the same law, the same formula, can be implemented across a wide range of different programming languages.
In the content below, you will find a collection of 150 code snippets, each corresponding to one of the world’s leading programming languages:
Python, C++, Java, C, C#, JavaScript, TypeScript, PHP, Ruby, Swift, Go, Rust, Kotlin, Dart, Scala, R, MATLAB, Julia, Haskell, Perl, Shell, SQL, Visual Basic, Assembly, Ada, Fortran, Prolog, Scheme, Lisp, Scratch, Smalltalk, Pascal, Groovy, PowerShell, Apex, ABAP, ActionScript, Algol, Alice, AmbientTalk, AngelScript, APL, Arc, Arduino, ASP.NET, AssemblyScript, ATS, AWK, Ballerina, BASIC, VHDL, Verilog, Assembly, AutoHotkey, AutoLISP, AWK, Bash, bc, Boo, Clojure, COBOL, Common Lisp, Crystal, D, Delphi/Object Pascal, Dylan, Eiffel, Elixir, Elm, Emacs Lisp, Erlang, F#, Factor, Falcon, Fantom, Felix, Forth, Fortress, Frink, Gambas, GAMS, GAP, Genie, GLSL, Hack, Haxe, HDL, HLSL, Hope, HTML, HyperTalk, Icon, IDL, Inform, Io, Ioke, J, J#, JScript, JavaFX Script, Io, Ioke, J, J#, JScript, Julia, Kotlin, LabVIEW, Ladder Logic, Lasso, Lava, Lisp, LiveCode, Logo, Lua, M4, Magik, Maple, Mathematica, MATLAB, Mercury, Modula-2, Modula-3, MoonScript, Nemerle, NetLogo, Nim, Nix, Objective-C, Objective-J, OCaml, OpenCL, OpenEdge ABL, Oz, PL/I, PL/SQL, PostScript, Promela, Pure, Q#, Racket, RAPID, REBOL, Red, Rexx, Ring, Solidity, SPARK, SPSS, Squirre
All the code snippets illustrate how to calculate the fundamental quantities of The NKTg Law on Varying Inertia:
The movement tendency of an object in space depends on the relationship between its position, velocity, and mass.
NKTg = f(x, v, m)
In which:
  • x is the position or displacement of the object relative to the reference point.
  • v is the velocity.
  • m is the mass.
The movement tendency of the object is determined by the following basic product quantities:
NKTg₁ = x × p
NKTg₂ = (dm/dt) × p
In which:
  • p is the linear momentum, calculated by p = m × v.
  • dm/dt is the rate of mass change over time.
  • NKTg₁ is the quantity representing the product of position and momentum.
  • NKTg₂ is the quantity representing the product of mass variation and momentum.
  • The unit of measurement is NKTm, representing a unit of varying inertia.
The sign and value of the two quantities NKTg₁ and NKTg₂ determine the movement tendency:
  • If NKTg₁ is positive, the object tends to move away from the stable state.
  • If NKTg₁ is negative, the object tends to move toward the stable state.
  • If NKTg₂ is positive, the mass variation has a supporting effect on the movement.
  • If NKTg₂ is negative, the mass variation has a resisting effect on the movement.
The stable state in this law is understood as the state in which the position (x), velocity (v), and mass (m) of the object interact with each other to maintain the movement structure, helping the object avoid losing control and preserving its inherent movement pattern.
# Python:
versatile, easy to learn, strong for AI and data science
x, v, m, dm_dt = 2.0, 3.0, 5.0, 0.1
p = m * v
NKTg1 = x * p
NKTg2 = dm_dt * p
print(f"p={p}, NKTg1={NKTg1}, NKTg2={NKTg2}")
Java
// Java: enterprise applications, Android
public class NKTgLaw {
public static void main(String[] args) {
double x=2, v=3, m=5, dm_dt=0.1;
double p = m*v, NKTg1 = x*p, NKTg2 = dm_dt*p;
System.out.printf(
"p=%.2f NKTg1=%.2f NKTg2=%.2f%n", p, NKTg1, NKTg2);
}
}
Implementing the same law across 150 programming ecosystems demonstrates its universality and flexibility, while also confirming that any language—whether general-purpose and popular, or specialized and classical—can apply the NKTg Law to simulate, analyze, and handle practical problems.
Full list of 150 programming languages (complete) — due to post size limits I placed the complete list on an external page for easy viewing and download:
You can refer to the following four related articles to gain a deeper understanding of the NKTg Law and its applications
Independent researcher: Nguyễn Khánh Tùng
ORCID: 0009-0002-9877-4137
Email: traiphieu.com@gmail.com
Hello everyone,
I would like to share some results from my recent research on the NKTg law of variable inertia and how it was experimentally verified using NASA JPL Horizons data (Dec 30–31, 2024).
🔹 What is the NKTg Law?
The law states that an object’s tendency of motion depends on the interaction between its position (x), velocity (v), and mass (m) through the conserved quantity:
NKTg1 = x * (m * v)
Here, m * v is the linear momentum.
If NKTg1 > 0 → the object tends to move away from equilibrium.
If NKTg1 < 0 → the object tends to return to equilibrium.
This law provides a new framework for analyzing orbital dynamics.
🔹 Research Objective
Interpolate the masses of all 8 planets using the NKTg law.
Compare results with NASA’s official planetary masses on 31/12/2024.
Test sensitivity for Earth’s mass loss as measured by GRACE / GRACE-FO missions.
🔹 Key Results
Table 1 – Mass Interpolation (31/12/2024)
Planet Interpolated Mass (kg) NASA Mass (kg) Δm Remarks
Mercury 3.301×10^23 3.301×10^23 ≈0 Perfect match
Venus 4.867×10^24 4.867×10^24 ≈0 Negligible error
Earth 5.972×10^24 5.972×10^24 ≈0 GRACE confirms slight variation
Mars 6.417×10^23 6.417×10^23 ≈0 Perfect match
Jupiter 1.898×10^27 1.898×10^27 ≈0 Stable mass
Saturn 5.683×10^26 5.683×10^26 ≈0 Error ≈ zero
Uranus 8.681×10^25 8.681×10^25 ≈0 Matches Voyager 2 data
Neptune 1.024×10^26 1.024×10^26 ≈0 Perfect match
Error rate: < 0.0001% across all planets.
🔹 Earth’s Mass Variation
NASA keeps Earth’s mass constant in official datasets.
GRACE/GRACE-FO show Earth loses ~10^20–10^21 kg annually (gas escape, ice melt, groundwater loss).
NKTg interpolation detected a slight decrease (~3 × 10^19 kg in 2024), which is within GRACE’s measured range.
This demonstrates the sensitivity of the NKTg model in detecting subtle real-world changes.
🔹 Why This Matters
Accuracy: NKTg interpolation perfectly matched NASA’s planetary masses.
Conservation: NKTg1 appears to be a conserved orbital quantity across both rocky and gas planets.
Applications:
  • Real-time planetary mass estimation using (x, v) data.
  • Integration into orbital mechanics simulations in MATLAB.
  • Potential extensions into astrophysics and engineering models.
🔹 Conclusion
The NKTg law provides a novel way to interpolate planetary masses with extremely high accuracy, while also being sensitive to subtle physical changes like Earth’s gradual mass loss.
This could open up new opportunities for:
  • Data-driven planetary modeling in MATLAB.
  • Improved sensitivity in detecting small-scale variations not included in standard NASA datasets.
References:
  • NASA JPL Horizons (planetary positions & velocities)
  • NASA Planetary Fact Sheet (official masses)
  • GRACE / GRACE-FO Mission Data (Earth mass loss)
I’d be very interested in hearing thoughts from the community about:
  • How to integrate the NKTg model into MATLAB orbital simulations.
  • Whether conserved quantities like NKTg1 could provide practical value beyond astronomy (e.g., physics simulations, engineering).
You can refer to the following four related articles to gain a deeper understanding of the NKTg Law and its applications
Best regards,
Nguyen Khanh Tung
Independent researcher: Nguyễn Khánh Tùng
ORCID: 0009-0002-9877-4137
Email: traiphieu.com@gmail.com
Theoretical Basis
The NKTg Law of Variable Inertia:
An object's tendency of motion in space depends on its position (x), velocity (v), and mass (m).
NKTg = f(x, v, m)
Fundamental interaction quantities:
NKTg1 = x * p
NKTg2 = (dm/dt) * p
where
p = m * v
For interpolation, we use:
m = NKTg1 / (x * v)
Research Objectives
  1. Verify interpolation of planetary masses using NKTg law.
  2. Compare with NASA real-time data (31/12/2024).
  3. Test sensitivity with Earth’s mass loss (NASA GRACE).
MATLAB Implementation
% NKTg Law Verification in MATLAB
% Author: Nguyen Khanh Tung
% Date: 31-12-2024
% Planetary data from NASA (30/12/2024)
planets = {
'Mercury','Venus','Earth','Mars','Jupiter','Saturn','Uranus','Neptune'};
x = [6.9817930e7, 1.08939e8, 1.471e8, 2.4923e8, ...
8.1662e8, 1.50653e9, 3.00139e9, 4.5589e9]; % km
v = [38.86, 35.02, 29.29, 24.07, 13.06, 9.69, 6.8, 5.43]; % km/s
m_nasa = [3.301e23, 4.867e24, 5.972e24, 6.417e23, ...
1.898e27, 5.683e26, 8.681e25, 1.024e26]; % kg
% Compute momentum
p = m_nasa .* v;
% Compute NKTg1
NKTg1 = x .* p;
% Interpolated masses using m = NKTg1 / (x*v)
m_interp = NKTg1 ./ (x .* v);
% Compare results in a table
T = table(planets', m_nasa', m_interp', (m_nasa - m_interp)', ...
'VariableNames', {'Planet','NASA_mass','Interpolated_mass','Delta_m'})
disp(T)
Results
  • All 8 planets’ interpolated masses match NASA values almost perfectly.
  • Deviation (Delta_m) ≈ 0 → error < 0.0001%.
  • Confirms that NKTg1 is conserved across planetary orbits.
Earth’s Mass Loss (GRACE/GRACE-FO)
  • GRACE missions show Earth loses mass annually (10^20 – 10^21 kg/year).
  • NKTg interpolation detects Δm ≈ 3 × 10^19 kg.
  • This matches the lower bound of NASA’s measured range.
Conclusion
  • NKTg₁ interpolation is extremely accurate for planetary masses.
  • Planetary data can be reconstructed with negligible error.
  • NKTg model is sensitive enough to capture Earth’s small annual mass loss.
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025 on November 12 – 13, 2025!
Register now and start building your customized agenda today!
Explore. Experience. Engage.
Join MATLAB EXPO to connect with MathWorks and industry experts to learn about the latest trends and advancements in engineering and science. You will discover new features and capabilities for MATLAB and Simulink that you can immediately apply to your work.
I just noticed that MATLAB R2025b is available. I am a bit surprised, as I never got notification of the beta test for it.
This topic is for highlights and experiences with R2025b.
Have you ever been enrolled in a course that uses an LMS and there is an assignment that invovles posting a question to, or answering a question in, a discussion group? This discussion group is meant to simulate that experience.
Chen Lin
Chen Lin
최근 활동: 2025년 9월 16일 20:50

I came across this fun video from @Christoper Lum, and I have to admit—his MathWorks swag collection is pretty impressive! He’s got pieces I even don’t have.
So now I’m curious… what MathWorks swag do you have hiding in your office or closet?
  • Which one is your favorite?
  • Which ones do you want to add to your collection?
Show off your swag and share it with the community! 🚀
“Hello, I am Subha & I’m part of the organizing/mentoring team for NASA Space Apps Challenge Virudhunagar 2025 🚀. We’re looking for collaborators/mentors with ML and MATLAB expertise to help our student teams bring their space solutions to life. Would you be open to guiding us, even briefly? Your support could impact students tackling real NASA challenges. 🌍✨”

The functionality would allow report generation straight from live scripts that could be shared without exposing the code. This could be useful for cases where the recipient of the report only cares about the results and not the code details, or when the methodology is part of a company know how, e.g. Engineering services companies.

In order for it to be practical for use it would also require that variable values could be inserted into the text blocks, e.g. #var_name# would insert the value of the variable "var_name" and possibly selecting which code blocks to be hidden.

Rizwan Khan
Rizwan Khan
최근 활동: 2025년 9월 12일 11:38

With AI agents dev coding on other languages has become so easy.
Im waiting for matlab to build something like warp but for matlab.
I know they have the current ai but with all respect it's rubbish compared to vibe coding tools in others sectors.
Matlab leads AI so it really should be leading this space.

Discussions 정보

Discussions is a user-focused forum for the conversations that happen outside of any particular product or project.

Get to know your peers while sharing all the tricks you've learned, ideas you've had, or even your latest vacation photos. Discussions is where MATLAB users connect!

기타 커뮤니티 영역

MATLAB Answers

MATLAB 및 Simulink에 관해 묻고 답하세요!

File Exchange

사용자 제출 코드를 다운로드하고 기여하세요!

Cody

문제를 풀고 MATLAB에 대해 배우며 배지도 획득하세요!

블로그

내부 개발자가 바라보는 MATLAB 및 Simulink!

AI Chat Playground

AI를 사용해 MATLAB 코드 초안을 생성하고 질문에 답할 수 있습니다!