Contenuto principale

Risultati per

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).
Best regards,
Nguyen Khanh Tung
Nicolas Douillet
Nicolas Douillet
Ultima attività il 2 Set 2025 alle 13:21

Trinity
  • It's the question that drives us, Neo. It's the question that brought you here. You know the question, just as I did.
Neo
  • What is the Matlab?
Morpheus
  • Unfortunately, no one can be told what the Matlab is. You have to see it for yourself.
And also later :
Morpheus
  • The Matlab is everywhere. It is all around us. Even now, in this very room. You can feel it when you go to work [...]
The Architect
  • The first Matlab I designed was quite naturally perfect. It was a work of art. Flawless. Sublime.
[My Matlab quotes version of the movie (Matrix, 1999) ]
I'm introducing the NKTg Law, a concise model describing how an object's motion tendency depends on position (x), velocity (v), and mass (m).
Definition:
NKTg = f(x, v, m)
Key quantities:
  • NKTg₁ = x * p
  • NKTg₂ = (dm/dt) * p
where p = m * v and dm/dt is the time rate of mass change.
Interpretation:
  • NKTg₁ > 0 → tendency to move away from equilibrium
  • NKTg₁ < 0 → tendency to move toward equilibrium
  • NKTg₂ > 0 → mass variation supports motion
  • NKTg₂ < 0 → mass variation resists motion
Stable state: when x, v and m interact to preserve the motion structure.
Would you like a ready-to-run MATLAB script / Live Script to simulate and plot NKTg₁ and NKTg₂?
This is a feature which doesn't apear to currently exist, but I think alot of matlab users would like, particularly ones who write alot of custom classes.
Imagine i have a custom class with some properties:
classdef CustomClass < handle
properties
name (1,1) string = "default name"
varOne (1,1) double = 0
end
methods
function obj = CustomClass(name,varOne)
obj.name = name;
obj.VarOne = varOne;
end
end
end
Then imagine I have a function which returns one of these custom class objects:
function [obj] = Calculation(Var1,Var2,name)
arguments (Input)
Var1 (1,1) double
Var2 (1,1) double
end
arguments (Output)
obj (1,1) CustomClass
end
results = Var1 + Var2;
obj = CustomClass(name,result);
end
With this class and this function which returns one of these class objects, I would like the fact that I provided "(1,1) CustomClass" in the output arguemnts block of function "Calculation(Var1,Var2,name)" to trigger code assist automaticaly show me, when writing code that the retuned value from this funciton has properties "name" and "varOne" in the object.
For istance, if I write the following code with this function and the class in the Matlab search path
testObj = Calculation(1,1,"test");
testObj.varOne = 10; %the property "varOne" doesn't apear in code assist when writing this line of code
I would like that the fact function "Calcuation(Var1,Var2,name) has the output arguments block enforcing that this function must return an object of "CustomClass" to make code assist recognise that "testObj" is a "CustomClass" object, just as if testObj was an input argument to another function which had an input argument requiring that "testObj" was a "CustomClass" object.
Maybe this is a feature that may be added to matlab in future releases? (please and thank you LOL)
I'm planning to start a personal scientific software project. I used to be familiar with Matlab (quite some time ago), so Matlab would be my first choice. But I keep hearing that Matlab is old stuff and I should use Julia or something like that. I wouldn't find learning Julia difficult, so familiarity with Matlab is not an important factor. Neither is cost, because I can afford a home license for Matlab, Simulink and a few toolboxes. So I'm thinking. Please give me your input! Why should I use Matlab in 2025 instead of alternatives?
I am deeply honored to announce the official publication of my latest academic volume:
MATLAB for Civil Engineers: From Basics to Advanced Applications
(Springer Nature, 2025).
This work serves as a comprehensive bridge between theoretical civil engineering principles and their practical implementation through MATLAB—a platform essential to the future of computational design, simulation, and optimization in our field.
Structured to serve both academic audiences and practicing engineers, this book progresses from foundational MATLAB programming concepts to highly specialized applications in structural analysis, geotechnical engineering, hydraulic modeling, and finite element methods. Whether you are a student building analytical fluency or a professional seeking computational precision, this volume offers an indispensable resource for mastering MATLAB's full potential in civil engineering contexts.
With rigorously structured examples, case studies, and research-aligned methods, MATLAB for Civil Engineers reflects the convergence of engineering logic with algorithmic innovation—equipping readers to address contemporary challenges with clarity, accuracy, and foresight.
📖 Ideal for:
— Graduate and postgraduate civil engineering students
— University instructors and lecturers seeking a structured teaching companion
— Professionals aiming to integrate MATLAB into complex real-world projects
If you are passionate about engineering resilience, data-informed design, or computational modeling, I invite you to explore the work and share it with your network.
🧠 Let us advance the discipline together through precision, programming, and purpose.
Vivek
Vivek
Ultima attività il 17 Ago 2025 alle 18:56

Hello,
Now that the "Copilot+PC" (Windows ARM) laptops are rapidly increasing in market share (Microsoft Surface Laptop, Dell XPS 13, HP OmniBook X 14, and more), are there any plans to provide builds for Matlab on Windows arm64?
Since there are already Windows builds of Matlab, it shouldn't be too hard to compile for Windows arm64, as far as I know. But I am not famaliar with Matlab's codebase.
Please try to publish Windows arm64 builds soon so that Matlab can be much more usable on Windows on ARM as it will run natively instead of in emulation.
Thank you very much.
I am inspired by the latest video from YouTube science content creator Veritasium on his distinct yet thorough explanation on how rainbows work. In his video, he set up a glass sphere experiment representing how light rays would travel inside a raindrop that ultimately forms the rainbow. I highly recommend checking it out.
In the meantime, I created an interactive MATLAB App in MATLAB Online using App Designer to visualize the light paths going through a spherical raindrop with numerical calculations along the way. While I've seen many diagrams out there showing the light paths, I haven't found any doing calculations in each step. Hence I created an app in MATLAB to show the calculations along with the visualizations as one varies the position of the incoming light ray.
Demo video:
For more information about the app and how to open it and play around with it in MATLAB Online, please check out my blog article:
hope this message finds you well. I am currently working on a project involving the design and numerical simulation of metalenses using Zemax and MATLAB. The design phase involves saving phase data from the Zemax simulation, which is later used in a numerical script to generate the metalens in MATLAB.
I have a MATLAB file that contains the phase data saved from Zemax, but I am unsure of the specific method or format used to extract and save the data from Zemax. The phase data I currently have in MATLAB is as follows:
  • Phase matrix: 571 x 571 (double)
  • X data: 571 x 1 (double)
  • Y data: 571 x 1 (double)
Could you please provide guidance on:
  1. How this phase data was likely saved from Zemax into MATLAB?
  2. What steps or scripts were used to extract this information from the design, particularly the 571 x 571 phase matrix and the corresponding X and Y data?
  3. Any best practices or tools available in Zemax for exporting such data?
This information will help me reproduce the workflow and proceed with my analysis.
Thank you for your support. I look forward to your guidance.
Best regards,
Zaka
goc3
goc3
Ultima attività il 3 Dic 2024

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.
Zahraa
Zahraa
Ultima attività il 14 Ago 2024

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!
"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?
📚 New Book Announcement: "Image Processing Recipes in MATLAB" 📚
I am delighted to share the release of my latest book, "Image Processing Recipes in MATLAB," co-authored by my dear friend and colleague Gustavo Benvenutti Borba.
This 'cookbook' contains 30 practical recipes for image processing, ranging from foundational techniques to recently published algorithms. It serves as a concise and readable reference for quickly and efficiently deploying image processing pipelines in MATLAB.
Gustavo and I are immensely grateful to the MathWorks Book Program for their support. We also want to thank Randi Slack and her fantastic team at CRC Press for their patience, expertise, and professionalism throughout the process.
___________

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!

I'm excited to share some valuable resources that I've found to be incredibly helpful for anyone looking to enhance their MATLAB skills. Whether you're just starting out, studying as a student, or are a seasoned professional, these guides and books offer a wealth of information to aid in your learning journey.
These materials are freely available and can be a great addition to your learning resources. They cover a wide range of topics and are designed to help users at all levels to improve their proficiency in MATLAB.
Happy learning and I hope you find these resources as useful as I have!
Before we begin, you will need to make sure you have 'sir_age_model.m' installed. Once you've downloaded this folder into your working directory, which can be located at your current folder. If you can see this file in your current folder, then it's safe to use it. If you choose to use MATLAB online or MATLAB Mobile, you may upload this to your MATLAB Drive.
This is the code for the SIR model stratified into 2 age groups (children and adults). For a detailed explanation of how to derive the force of infection by age group.
% Main script to run the SIR model simulation
% Initial state values
initial_state_values = [200000; 1; 0; 800000; 0; 0]; % [S1; I1; R1; S2; I2; R2]
% Parameters
parameters = [0.05; 7; 6; 1; 10; 1/5]; % [b; c_11; c_12; c_21; c_22; gamma]
% Time span for the simulation (3 months, with daily steps)
tspan = [0 90];
% Solve the ODE
[t, y] = ode45(@(t, y) sir_age_model(t, y, parameters), tspan, initial_state_values);
% Plotting the results
plot(t, y);
xlabel('Time (days)');
ylabel('Number of people');
legend('S1', 'I1', 'R1', 'S2', 'I2', 'R2');
title('SIR Model with Age Structure');
What was the cumulative incidence of infection during this epidemic? What proportion of those infections occurred in children?
In the SIR model, the cumulative incidence of infection is simply the decline in susceptibility.
% Assuming 'y' contains the simulation results from the ode45 function
% and 't' contains the time points
% Total cumulative incidence
total_cumulative_incidence = (y(1,1) - y(end,1)) + (y(1,4) - y(end,4));
fprintf('Total cumulative incidence: %f\n', total_cumulative_incidence);
% Cumulative incidence in children
cumulative_incidence_children = (y(1,1) - y(end,1));
% Proportion of infections in children
proportion_infections_children = cumulative_incidence_children / total_cumulative_incidence;
fprintf('Proportion of infections in children: %f\n', proportion_infections_children);
927,447 people became infected during this epidemic, 20.5% of which were children.
Which age group was most affected by the epidemic?
To answer this, we can calculate the proportion of children and adults that became infected.
% Assuming 'y' contains the simulation results from the ode45 function
% and 't' contains the time points
% Proportion of children that became infected
initial_children = 200000; % initial number of susceptible children
final_susceptible_children = y(end,1); % final number of susceptible children
proportion_infected_children = (initial_children - final_susceptible_children) / initial_children;
fprintf('Proportion of children that became infected: %f\n', proportion_infected_children);
% Proportion of adults that became infected
initial_adults = 800000; % initial number of susceptible adults
final_susceptible_adults = y(end,4); % final number of susceptible adults
proportion_infected_adults = (initial_adults - final_susceptible_adults) / initial_adults;
fprintf('Proportion of adults that became infected: %f\n', proportion_infected_adults);
Throughout this epidemic, 95% of all children and 92% of all adults were infected. Children were therefore slightly more affected in proportion to their population size, even though the majority of infections occurred in adults.
When I embed Matlab windows into C#, I use C# to call the mouse functions such as drawline() and getpts() which are encapsulated in Matlab's dll, and then the program crashes, how can I solve this problem?
ps : The functions that I call in C# can be executed in Matlab.
ps : If I don't embed the window into C#, but just let C# call the Matlab function, it can execute the mouse control normally in the window, but once embedded into the C# window, it will crash when execute the mouse command.
Hi Everyone. I am facing a problem while connecting the FMU to the buses. I have one FMU which expects 9 inputs and I did clarify the same while using bus creator. But in the end i am getting this error which i am trying to solve for couple of hours but didn't get any solution. So if any knows about the same please help me. I would give details as well if you need any other information.
New Cheat Sheet Alert!
Level up your data organization and access skills in MATLAB with our latest cheat sheet! Download the full cheat sheet on MATLAB GitHub for Students here.