R2025b

New Features, Bug Fixes

Quality and stability improvements

R2025b delivers quality and stability improvements, building on the new features introduced in R2025a.

getframe Function: Improved performance when capturing frames in loop

Capturing frames in a loop using the getframe function shows improved performance. The improvement becomes more noticeable as the size of the figure and number of frames increase.

For example, create a figure that is 1074-by-647 pixels in size and plot a surface. Change the shape of the surface 100 times in a loop, and capture a frame in each iteration. This code is about 1.5x faster than in the previous release.

function timingCaptureFrames
f = figure(Position=[0 0 1074 647]);
Z = peaks;
s = surf(Z);
loops = 100;
M(loops) = struct(cdata=[],colormap=[]);
axis tight manual
tic
for k = 1:loops
    Zframe = sin(k*pi/10)*Z;
    s.ZData = Zframe;
    M(k) = getframe(f);
end
toc
end

The approximate execution times are:

R2025a: 7.79 s

R2025b: 5.18 s

The code was timed on a Windows® 11, Intel Core® i7-8665U CPU 8-Core Processor @ 1.90 GHz test system with a Microsoft® Remote Display Adapter and Intel® UHD Graphics 620 by calling the timingCaptureFrames function.

MATLAB Support Package for Quantum Computing: Solve knapsack and traveling salesperson problems using QUBO (September 2025, Version 25.2.0)

You can solve knapsack and traveling salesperson problems as QUBO problems. Convert the knapsack or traveling salesperson problem to an equivalent QUBO formulation using the knapsack2qubo or tsp2qubo function, respectively, which returns a qubo object. Solve the QUBO problem by using the solve function, which returns a quboResult object. You can then convert the QUBO result back to the knapsack or traveling salesperson formulation using the quboResult2knapsack or quboResult2tsp function, respectively.

MATLAB Support Package for Quantum Computing: Calculate expectation values using quantum devices (November 2025, Version 25.2.1)

When you run a quantum circuit using the run function, you can specify the possible Pauli basis measurement results by using the new Observable name-value argument. If you specify Observable, then the run function returns a QuantumTaskAWS or QuantumTaskIBM object whose result is the expectation value of measuring the quantum circuit in the basis specified by the observable. You can then retrieve the result of the quantum task object as a numeric expectation value using the fetchOutput function.