Hello and a warm welcome to all! We're thrilled to have you visit our community. MATLAB Central is a place for learning, sharing, and connecting with others who share your passion for MATLAB and Simulink. To ensure you have the best experience, here are some tips to get you started:

- Read the Community Guidelines: Understanding our community standards is crucial. Please take a moment to familiarize yourself with them. Keep in mind that posts not adhering to these guidelines may be flagged by moderators or other community members.
- Ask Technical Questions at MATLAB Answers: If you have questions related to MathWorks products, head over to MATLAB Answers (new question form - Ask the community). It's the go-to spot for technical inquiries, with responses often provided within an hour, depending on the complexity of the question and volunteer availability. To increase your chances of a speedy reply, check out our tips on how to craft a good question (link to post on asking good questions).
- Choosing the Right Channel: We offer a variety of discussion channels tailored to different contexts. Select the one that best fits your post. If you're unsure, the General channel is always a safe bet. If you feel there's a need for a new channel, we encourage you to suggest it in the Ideas channel.
- Reporting Issues: If you encounter posts that violate our guidelines, please use the 🚩Flag/Report feature (found in the 3-dot menu) to bring them to our attention.
- Quality Control: We strive to maintain a high standard of discussion. Accounts that post spam or too much nonsense may be subject to moderation, which can include temporary suspensions or permanent bans.
- Share Your Ideas: Your feedback is invaluable. If you have suggestions on how we can improve the community or MathWorks products, the Ideas channel is the perfect place to voice your thoughts.

Enjoy yourself and have fun! We're committed to fostering a supportive and educational environment. Dive into discussions, share your expertise, and grow your knowledge. We're excited to see what you'll contribute to the community!

BUGCROWD

Similar to what has happened with the wishlist threads (#1 #2 #3 #4 #5), the "what frustrates you about MATLAB" thread has become very large. This makes navigation difficult and increases page load times.

So here is the follow-up page.

What should you post where?

Next Gen threads (#1): features that would break compatibility with previous versions, but would be nice to have

@anyone posting a new thread when the last one gets too large (about 50 answers seems a reasonable limit per thread), please update this list in all last threads. (if you don't have editing privileges, just post a comment asking someone to do the edit)

Gabriel's horn is a shape with the paradoxical property that it has infinite surface area, but a finite volume.

Gabriel’s horn is formed by taking the graph of with the domain and rotating it in three dimensions about the axis.

There is a standard formula for calculating the volume of this shape, for a general function .Wwe will just state that the volume of the solid between a and b is:

The surface area of the solid is given by:

One other thing we need to consider is that we are trying to find the value of these integrals between 1 and ∞. An integral with a limit of infinity is called an improper integral and we can't evaluate it simply by plugging the value infinity into the normal equation for a definite integral. Instead, we must first calculate the definite integral up to some finite limit b and then calculate the limit of the result as b tends to ∞:

Volume

We can calculate the horn's volume using the volume integral above, so

The total volume of this infinitely long trumpet isπ.

Surface Area

To determine the surface area, we first need the function’s derivative:

Now plug it into the surface area formula and we have:

This is an improper integral and it's hard to evaluate, but since in our interval

So, we have :

Now,we evaluate this last integral

So the surface are is infinite.

% Define the function for Gabriel's Horn

gabriels_horn = @(x) 1 ./ x;

% Create a range of x values

x = linspace(1, 40, 4000); % Increase the number of points for better accuracy

y = gabriels_horn(x);

% Create the meshgrid

theta = linspace(0, 2 * pi, 6000); % Increase theta points for a smoother surface

[X, T] = meshgrid(x, theta);

Y = gabriels_horn(X) .* cos(T);

Z = gabriels_horn(X) .* sin(T);

% Plot the surface of Gabriel's Horn

figure('Position', [200, 100, 1200, 900]);

surf(X, Y, Z, 'EdgeColor', 'none', 'FaceAlpha', 0.9);

hold on;

% Plot the central axis

plot3(x, zeros(size(x)), zeros(size(x)), 'r', 'LineWidth', 2);

% Set labels

xlabel('x');

ylabel('y');

zlabel('z');

% Adjust colormap and axis properties

colormap('gray');

shading interp; % Smooth shading

% Adjust the view

view(3);

axis tight;

grid on;

% Add formulas as text annotations

dim1 = [0.4 0.7 0.3 0.2];

annotation('textbox',dim1,'String',{'$$V = \pi \int_{1}^{a} \left( \frac{1}{x} \right)^2 dx = \pi \left( 1 - \frac{1}{a} \right)$$', ...

'', ... % Add an empty line for larger gap

'$$\lim_{a \to \infty} V = \lim_{a \to \infty} \pi \left( 1 - \frac{1}{a} \right) = \pi$$'}, ...

'Interpreter','latex','FontSize',12, 'EdgeColor','none', 'FitBoxToText', 'on');

dim2 = [0.4 0.5 0.3 0.2];

annotation('textbox',dim2,'String',{'$$A = 2\pi \int_{1}^{a} \frac{1}{x} \sqrt{1 + \left( -\frac{1}{x^2} \right)^2} dx > 2\pi \int_{1}^{a} \frac{dx}{x} = 2\pi \ln(a)$$', ...

'', ... % Add an empty line for larger gap

'$$\lim_{a \to \infty} A \geq \lim_{a \to \infty} 2\pi \ln(a) = \infty$$'}, ...

'Interpreter','latex','FontSize',12, 'EdgeColor','none', 'FitBoxToText', 'on');

% Add Gabriel's Horn label

dim3 = [0.3 0.9 0.3 0.1];

annotation('textbox',dim3,'String','Gabriel''s Horn', ...

'Interpreter','latex','FontSize',14, 'EdgeColor','none', 'HorizontalAlignment', 'center');

hold off

daspect([3.5 1 1]) % daspect([x y z])

view(-27, 15)

lightangle(-50,0)

lighting('gouraud')

The properties of this figure were first studied by Italian physicist and mathematician Evangelista Torricelli in the 17th century.

Acknowledgment

I would like to express my sincere gratitude to all those who have supported and inspired me throughout this project.

First and foremost, I would like to thank the mathematician and my esteemed colleague, Stavros Tsalapatis, for inspiring me with the fascinating subject of Gabriel's Horn.

I am also deeply thankful to Mr. @Star Strider for his invaluable assistance in completing the final code.

References:

When it comes to MOS tube burnout, it is usually because it is not working in the SOA workspace, and there is also a case where the MOS tube is overcurrent.

For example, the maximum allowable current of the PMOS transistor in this circuit is 50A, and the maximum current reaches 80+ at the moment when the MOS transistor is turned on, then the current is very large.

At this time, the PMOS is over-specified, and we can see on the SOA curve that it is not working in the SOA range, which will cause the PMOS to be damaged.

So what if you choose a higher current PMOS? Of course you can, but the cost will be higher.

We can choose to adjust the peripheral resistance or capacitor to make the PMOS turn on more slowly, so that the current can be lowered.

For example, when adjusting R1, R2, and the jumper capacitance between gs, when Cgs is adjusted to 1uF, The Ids are only 40A max, which is fine in terms of current, and meets the 80% derating.

(50 amps * 0.8 = 40 amps).

Next, let’s look at the power, from the SOA curve, the opening time of the MOS tube is about 1ms, and the maximum power at this time is 280W.

The normal thermal resistance of the chip is 50°C/W, and the maximum junction temperature can be 302°F.

Assuming the ambient temperature is 77°F, then the instantaneous power that 1ms can withstand is about 357W.

The actual power of PMOS here is 280W, which does not exceed the limit, which means that it works normally in the SOA area.

Therefore, when the current impact of the MOS transistor is large at the moment of turning, the Cgs capacitance can be adjusted appropriately to make the PMOS Working in the SOA area, you can avoid the problem of MOS corruption.

Which Matlab related forums and newsgroups do you use beside MATLAB Answers? Which languages do they use? Which advantages and unique features do they have?

Do you think that these forums complement or compete against MathWorks and its communication platform?

Actually all answers are accepted.

Kindly link me to the Channel Modeling Group.

I read and compreheneded a paper on channel modeling "An Adaptive Geometry-Based Stochastic Model for Non-Isotropic MIMO Mobile-to-Mobile Channels" except the graphical results obtained from the MATLAB codes. I have tried to replicate the same graphs but to no avail from my codes. And I am really interested in the topic, i have even written to the authors of the paper but as usual, there is no reply from them. Kindly assist if possible.

Dear MATLAB community,

How can I help my close friend who's bad at math and programming learn MATLAB?

He's a final year chemical engineering student who struggles even to plot two functions on the same graph in his computational fluid dynamics class (there was no prereq for matlab skills).

In his first year, I saw him get dragged through the introductory engineering classes which was his first encounter with MATLAB. Students were taught a few rudimentary programming skills and then were expected to make a code for a 'simple' tic-tac-toe game. It took him hours of blank looks and tutoring to even understand the simplest of boolean operators. He was never able to write a working function without the supervision of a friend or tutor. Needless to say, he was permanently scarred by the experience and swore to avoid using it forever.

After 3 years of avoiding MATLAB, he realised how not knowing it hurt him during his final year project. He had to solve a system of pdes to model the performance of a reactor and practically speaking, MATLAB was the most suitable software at hand. He ended up having to get a friend to help him code the equations in while also having to oversimplify his model.

The weird thing is that: most students from his chemical engineering faculty were not expected or encouraged to use MATLAB, almost all of their prior assignments required no use of MATLAB except that infamous first year course, and most of his peers also avoided using MATLAB and resorted to Excel. It is my understanding that Excel cannot match MATLAB's efficiency and clarity when solving calculus problems so it was not uncommon to see extremely long Excel spreadsheets.

Anyway, my friend is, with the help of a friend's past year MATLAB codes, trying to finish up his computational fluid dynamics assignment that's due soon. He finishes university in 2 weeks time.

Even though he knows that not every engineer has to use MATLAB in the workplace, he somehow wishes he was able to learn MATLAB at his glacial pace. I find it such a pity that he was never able to keep up with the pace of learning that was expected which begs the question: are students who are too slow at learning programming better of in a different field of study?

If you've managed to read to the end of this, thank you so much. I just don't know how to help my friend and I'm hoping some of you might be able to suggest how I can help him be better at it. I believe he has potential but needs special help when it comes to MATLAB.

All helpful and constructive suggestions considered,

Thank You All

While searching the internet for some books on ordinary differential equations, I came across a link that I believe is very useful for all math students and not only. If you are interested in ODEs, it's worth taking the time to study it.

A First Look at Ordinary Differential Equations by Timothy S. Judson is an excellent resource for anyone looking to understand ODEs better. Here's a brief overview of the main topics covered:

- Introduction to ODEs: Basic concepts, definitions, and initial differential equations.
- Methods of Solution:

- Separable equations
- First-order linear equations
- Exact equations
- Transcendental functions

- Applications of ODEs: Practical examples and applications in various scientific fields.
- Systems of ODEs: Analysis and solutions of systems of differential equations.
- Series and Numerical Methods: Use of series and numerical methods for solving ODEs.

This book provides a clear and comprehensive introduction to ODEs, making it suitable for students and new researchers in mathematics. If you're interested, you can explore the book in more detail here: A First Look at Ordinary Differential Equations.

The study of the dynamics of the discrete Klein - Gordon equation (DKG) with friction is given by the equation :

In the above equation, W describes the potential function:

to which every coupled unit adheres. In Eq. (1), the variable $$ is the unknown displacement of the oscillator occupying the n-th position of the lattice, and is the discretization parameter. We denote by h the distance between the oscillators of the lattice. The chain (DKG) contains linear damping with a damping coefficient , whileis the coefficient of the nonlinear cubic term.

For the DKG chain (1), we will consider the problem of initial-boundary values, with initial conditions

and Dirichlet boundary conditions at the boundary points and , that is,

Therefore, when necessary, we will use the short notation for the one-dimensional discrete Laplacian

Now we want to investigate numerically the dynamics of the system (1)-(2)-(3). Our first aim is to conduct a numerical study of the property of Dynamic Stability of the system, which directly depends on the existence and linear stability of the branches of equilibrium points.

For the discussion of numerical results, it is also important to emphasize the role of the parameter . By changing the time variable , we rewrite Eq. (1) in the form

. We consider spatially extended initial conditions of the form: where is the distance of the grid and is the amplitude of the initial condition

We also assume zero initial velocity:

the following graphs for and

% Parameters

L = 200; % Length of the system

K = 99; % Number of spatial points

j = 2; % Mode number

omega_d = 1; % Characteristic frequency

beta = 1; % Nonlinearity parameter

delta = 0.05; % Damping coefficient

% Spatial grid

h = L / (K + 1);

n = linspace(-L/2, L/2, K+2); % Spatial points

N = length(n);

omegaDScaled = h * omega_d;

deltaScaled = h * delta;

% Time parameters

dt = 1; % Time step

tmax = 3000; % Maximum time

tspan = 0:dt:tmax; % Time vector

% Values of amplitude 'a' to iterate over

a_values = [2, 1.95, 1.9, 1.85, 1.82]; % Modify this array as needed

% Differential equation solver function

function dYdt = odefun(~, Y, N, h, omegaDScaled, deltaScaled, beta)

U = Y(1:N);

Udot = Y(N+1:end);

Uddot = zeros(size(U));

% Laplacian (discrete second derivative)

for k = 2:N-1

Uddot(k) = (U(k+1) - 2 * U(k) + U(k-1)) ;

end

% System of equations

dUdt = Udot;

dUdotdt = Uddot - deltaScaled * Udot + omegaDScaled^2 * (U - beta * U.^3);

% Pack derivatives

dYdt = [dUdt; dUdotdt];

end

% Create a figure for subplots

figure;

% Initial plot

a_init = 2; % Example initial amplitude for the initial condition plot

U0_init = a_init * sin((j * pi * h * n) / L); % Initial displacement

U0_init(1) = 0; % Boundary condition at n = 0

U0_init(end) = 0; % Boundary condition at n = K+1

subplot(3, 2, 1);

plot(n, U0_init, 'r.-', 'LineWidth', 1.5, 'MarkerSize', 10); % Line and marker plot

xlabel('$x_n$', 'Interpreter', 'latex');

ylabel('$U_n$', 'Interpreter', 'latex');

title('$t=0$', 'Interpreter', 'latex');

set(gca, 'FontSize', 12, 'FontName', 'Times');

xlim([-L/2 L/2]);

ylim([-3 3]);

grid on;

% Loop through each value of 'a' and generate the plot

for i = 1:length(a_values)

a = a_values(i);

% Initial conditions

U0 = a * sin((j * pi * h * n) / L); % Initial displacement

U0(1) = 0; % Boundary condition at n = 0

U0(end) = 0; % Boundary condition at n = K+1

Udot0 = zeros(size(U0)); % Initial velocity

% Pack initial conditions

Y0 = [U0, Udot0];

% Solve ODE

opts = odeset('RelTol', 1e-5, 'AbsTol', 1e-6);

[t, Y] = ode45(@(t, Y) odefun(t, Y, N, h, omegaDScaled, deltaScaled, beta), tspan, Y0, opts);

% Extract solutions

U = Y(:, 1:N);

Udot = Y(:, N+1:end);

% Plot final displacement profile

subplot(3, 2, i+1);

plot(n, U(end,:), 'b.-', 'LineWidth', 1.5, 'MarkerSize', 10); % Line and marker plot

xlabel('$x_n$', 'Interpreter', 'latex');

ylabel('$U_n$', 'Interpreter', 'latex');

title(['$t=3000$, $a=', num2str(a), '$'], 'Interpreter', 'latex');

set(gca, 'FontSize', 12, 'FontName', 'Times');

xlim([-L/2 L/2]);

ylim([-2 2]);

grid on;

end

% Adjust layout

set(gcf, 'Position', [100, 100, 1200, 900]); % Adjust figure size as needed

Dynamics for the initial condition , , for , for different amplitude values. By reducing the amplitude values, we observe the convergence to equilibrium points of different branches from and the appearance of values for which the solution converges to a non-linear equilibrium point Parameters:

Detection of a stability threshold : For , the initial condition , , converges to a non-linear equilibrium point.

Characteristics for , with corresponding norm where the dynamics appear in the first image of the third row, we observe convergence to a non-linear equilibrium point of branch This has the same norm and the same energy as the previous case but the final state has a completely different profile. This result suggests secondary bifurcations have occurred in branch

By further reducing the amplitude, distinct values of are discerned: 1.9, 1.85, 1.81 for which the initial condition with norms respectively, converges to a non-linear equilibrium point of branch This equilibrium point has norm and energy . The behavior of this equilibrium is illustrated in the third row and in the first image of the third row of Figure 1, and also in the first image of the third row of Figure 2. For all the values between the aforementioned a, the initial condition converges to geometrically different non-linear states of branch as shown in the second image of the first row and the first image of the second row of Figure 2, for amplitudes and respectively.

Refference:

Check out this episode about PIVLab: https://www.buzzsprout.com/2107763/15106425

Join the conversation with William Thielicke, the developer of PIVlab, as he shares insights into the world of particle image velocimetery (PIV) and its applications. Discover how PIV accurately measures fluid velocities, non invasively revolutionising research across the industries. Delve into the development journey of PI lab, including collaborations, key features and future advancements for aerodynamic studies, explore the advanced hardware setups camera technologies, and educational prospects offered by PIVlab, for enhanced fluid velocity measurements. If you are interested in the hardware he speaks of check out the company: Optolution.

In the MATLAB description of the algorithm for Lyapunov exponents, I believe there is ambiguity and misuse.

The lambda(i) in the reference literature signifies the Lyapunov exponent of the entire phase space data after expanding by i time steps, but in the calculation formula provided in the MATLAB help documentation, Y_(i+K) represents the data point at the i-th point in the reconstructed data Y after K steps, and this calculation formula also does not match the calculation code given by MATLAB. I believe there should be some misguidance and misunderstanding here.

According to the symbol regulations in the algorithm description and the MATLAB code, I think the correct formula might be y(i) = 1/dt * 1/N * sum_j( log( ||Y_(j+i) - Y_(j*+i)|| ) )

Let's talk about probability theory in Matlab.

Conditions of the problem - how many more letters do I need to write to the sales department to get an answer?

To get closer to the problem, I need to buy a license under a contract. Maybe sometimes there are responsible employees sitting here who will give me an answer.

Thank you

📚 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.

___________

Are you local to Boston?

Shape the Future of MATLAB: Join MathWorks' UX Night In-Person!

When: June 25th, 6 to 8 PM

Where: MathWorks Campus in Natick, MA

🌟 Calling All MATLAB Users! Here's your unique chance to influence the next wave of innovations in MATLAB and engineering software. MathWorks invites you to participate in our special after-hours usability studies. Dive deep into the latest MATLAB features, share your valuable feedback, and help us refine our solutions to better meet your needs.

🚀 This Opportunity Is Not to Be Missed:

- Exclusive Hands-On Experience: Be among the first to explore new MATLAB features and capabilities.
- Voice Your Expertise: Share your insights and suggestions directly with MathWorks developers.
- Learn, Discover, and Grow: Expand your MATLAB knowledge and skills through firsthand experience with unreleased features.
- Network Over Dinner: Enjoy a complimentary dinner with fellow MATLAB enthusiasts and the MathWorks team. It's a perfect opportunity to connect, share experiences, and network after work.
- Earn Rewards: Participants will not only contribute to the advancement of MATLAB but will also be compensated for their time. Plus, enjoy special MathWorks swag as a token of our appreciation!

👉 Reserve Your Spot Now: Space is limited for these after-hours sessions. If you're passionate about MATLAB and eager to contribute to its development, we'd love to hear from you.

Are you a Simulink user eager to learn how to create apps with App Designer? Or an App Designer enthusiast looking to dive into Simulink?

Don't miss today's article on the Graphics and App Building Blog by @Robert Philbrick! Discover how to build Simulink Apps with App Designer, streamlining control of your simulations!