Answered
Simulink parameters change during simulation from Matlab cmd line
It is not possible to change the parametrs of the running Simulink simulation model from Matlab command line while the model is ...

1 year ago | 0

Answered
Convert a decimal approximation to exact value symbolically
sympref('FloatingPointOutput',false); Will display an unevaluated int() form for your original problem, and will display 4/pi -...

1 year ago | 0

Answered
compiled matlab script where incorrect variables are passing
Note that double('1') so somehow you are getting a quoted 1 instead of a numeric 1. I would suggest trying matlab -nodisplay...

1 year ago | 0

Answered
solving a cubic equation
syms a b c d x sol = solve(a*x^3 + b*x^2 + c*x + d, x, 'maxdegree', 3) numsol = subs(sol, [a,b,c,d], [1.5, -2, 3/8, -5]) %...

1 year ago | 0

Answered
How to write a timetable to excel with rowtimes as dates without times?
For MacOS and Linux, it is not possible to PreserveFormat . About the best you can do on MacOS is to convert the timetable to ...

1 year ago | 0

Answered
error message 'The end operator must be used within an array index expression.'
It is likely that the error is in code before what was posted. For example, a(end)=1 This error occurs because end was used to...

1 year ago | 1

Answered
Make MATLAB output in strict ASCII
Is there a built-in function to convert these occasional UTF non-ASCII characters to a reasonable approximation in standard ASCI...

1 year ago | 0

Answered
Matlab sorting numbers oddly
You probably want to use https://www.mathworks.com/matlabcentral/fileexchange/47434-natural-order-filename-sort The filename o...

1 year ago | 2

Answered
Fixing an old script containing JavaFrame / JavaContainer
All Java functionality associated with MATLAB figures is gone, never to return. jvi.setFigureIcon(ImageIcon(getfigureicon))...

1 year ago | 0

| accepted

Answered
Function not returning updated struct
When you create uicontrol, they are created and displayed (if appropriate), and then flow immediately continues onward without w...

1 year ago | 0

| accepted

Answered
How to rotate domain, but the lon and lat are on the contour (not on the axis)
You need to first calculate the tilt angle of the valid part of the data, then rotate by the negative of that angle so that the ...

1 year ago | 0

| accepted

Answered
Error using integral2Calc>integral2t/tensor (line 231) Input function must return 'double' or 'single' values. Found 'sym'.
h = 0.00172; rho = 1620; L = 100*h; c=L*L/4; M=10; N=10; syms xi eta shape_w=sym(zeros(M,N)); x_m=sym(zeros(M,1)); y...

1 year ago | 0

Answered
Enable/disable on radio button in app designer
You can create app.bg as a uibuttongroup and populate it with uiradiobutton . Later, you can bc = [app.bg.Children]; set(bc(1...

1 year ago | 0

| accepted

Answered
Simulation run time vs. PC
https://versus.com/en/intel-core-i7-11850h-vs-intel-xeon-gold-6234 The core-i7 (laptop) is 10 nm compared to 14 nm is 35W p...

1 year ago | 0

Answered
Offline Documentation for macOS AppleSilicon
This is a known issue; https://www.mathworks.com/matlabcentral/answers/2177941-why-am-i-not-able-to-download-the-macos-offline-d...

1 year ago | 0

| accepted

Answered
first order PDE , verification of one solution
syms x y real syms f(x_minus_y) v1 = diff(f(x-y),x) v2 = diff(f(x-y),y) ver = v1 + v2 simplify(ver) Which is not zero. I...

1 year ago | 0

Answered
I can't connect the PWM generator G output to the active rectifier output in an EV on-board charging system design
Since you are talking about connecting a "G" gate, I deduce that your PWN block is "PWM Gate Signal Generator (Three-phase, Two-...

1 year ago | 0

Answered
Precision lost when combining Int32 integers with single precision numerical numbers
The general rule is that when you combine numbers of two different types, that the result is the type that is considered more re...

1 year ago | 1

Answered
Using parallel computing to communicate with device
F = parfeval(backgroundPool,@UpdateWeight,1,Scale); F is returned as a future object. % Setup Timer scale_timer = timer('Time...

1 year ago | 0

Answered
concatanate arrays upon condition
At least in R2025a, there is no problem in using "," to concatenate empty datasets, as long as they are empty along either the f...

1 year ago | 0

Answered
how can figure renderer be changed in Matlab 2025a?
The figure renderer cannot be changed in R2025a. This is a fundamental change in R2025a, that OpenGL is no longer used and WebGL...

1 year ago | 0

Answered
Found unsupported division expression for HDL code generation; Signed input data type is not supported for division with Floor RoundMode, at Function 'mod'
You should be doing range reduction. sin(x) for negative x is -sin(-x). You could do something akin to if x < 0 x = 2*pi -...

1 year ago | 1

Answered
Mass importing .txt files with sequential names to plot multiple graphs on same figure for easy comparison
N = 30; files = "FreeField" + (1:N) + ".txt"; S = cell(N, 1); for K = 1 : N S{K} = readtable(files(K)); end for K ...

1 year ago | 1

| accepted

Answered
New MATLAB user: Rosetta 2 or Parallels for Apple M1 MacBook pro?
As of R2023b, MATLAB has had a native port for Apple Silicon series (ARM CPU)

1 year ago | 1

Answered
Simulink Matlab Fcn, logical error for incrementation in Goertzel's algorithm
count=single(0); That statement is executed every time the block is executed. You need persistent count if isempty(count); c...

1 year ago | 0

Answered
sprintf vs. compose performance for large arrays on macOS
My understanding is that compose is based on sprintf That is not correct, at least not directly. compose() selects elements "...

1 year ago | 1

Answered
How can we identify the type of traffic in wireless communication?
Uniform distribution (0–180 ms) That is obviously not bursty. Exponential (mean: 180 ms) First we need to calculate the multi...

1 year ago | 0

Answered
Problem istalling ML 2025 on Tower Computer but not Laptop, why?
The most common cause of problems such as these, is if the system with the problem has installed a third-party .m file with the ...

1 year ago | 0

Answered
Live Script calls multiple functions that produce a plot, but only the last one shows up.
Graphics calls that are made directly from LiveScript output in-line, and each time a plot would be erased it instead starts a n...

1 year ago | 1

| accepted

Answered
Same data - different answers
In the first case, you are typing in 14 significant digits; MATLAB stores at most 15 1/2 significant digits. In the second case...

1 year ago | 0

| accepted

Load more