Answered
Is it possible to have a string constant (output datatype: string) generated in UTF-8?
No, you cannot do this. Strings are exported as plain C / C++ character vectors, and plain C / C++ character vectors are 8 bit c...

2 years ago | 1

| accepted

Answered
genetic algorithm code for solving traveling salesman problem
Several people have posted the code in MATLAB Answers in the past. Search for it.

2 years ago | 0

| accepted

Answered
variables not being saved?
lumine(q) That call executes lumine with parameter q. Then it assigns the first output to a variable named ans and displays the...

2 years ago | 0

Answered
Error with find Function in MATLAB: "Incorrect number or types of inputs or outputs"
find() is not a supported operation on optimization variables. https://www.mathworks.com/help/optim/ug/supported-operations-on-...

2 years ago | 0

Answered
convert mat file to excel
You cannot generally convert .mat file to excel. You can potentially convert to excel under the special case that the .mat file...

2 years ago | 0

| accepted

Answered
Lorenz Attractor Animation with Frame-by-Frame Plotting
% Parameters sigma = 10; rho = 28; beta = 8/3; % Time span tspan = [0 50]; % Adjusted for smooth animation % Initial ...

2 years ago | 0

| accepted

Answered
Setting up communication via USB device with instrument
USB devices respond to hardware queries by listing a series of "endpoints". Each "endpoint" corresponds to a different behaviour...

2 years ago | 0

Answered
Custom datastore - why can't I just have a datastore with doubles?
Use arrayDatastore (since R2020b)

2 years ago | 1

Answered
How to find the roots of a non-polynomial equation in terms of symbolic variables ?
The Symbolic toolbox is not able to solve such equations. syms a A B K L real D = [cosh(K*L)-cos(K*L), sinh(K*L)-sin(K*L); sin...

2 years ago | 0

Answered
Always Error is seen
Most likely, you are using surf() or contour() and the complaint is that Z is not at least a 2 x 2 matrix. The most common caus...

2 years ago | 0

Answered
Why is matlab creating multiple figures
You are calling figure() within your while loop, so each time you create a new figure. You should probably be calling figure() ...

2 years ago | 0

Answered
how to open .mhd file
See read_mhd() from https://www.mathworks.com/matlabcentral/fileexchange/47457-simple-viewer-3d or read_mhd() from https://www...

2 years ago | 0

| accepted

Answered
Size of the left side different from the right side
for i=1:108 if isempty(SPAnsVector(1,i))==0 PersonalSPQ(1,j)=i; PersonalSPAns(1,j)=SPAnsVector(1,i); because...

2 years ago | 0

Answered
find best fit ellipse to a set of data points
https://www.mathworks.com/matlabcentral/answers/98522-how-do-i-fit-an-ellipse-to-my-data-in-matlab https://www.mathworks.com/m...

2 years ago | 2

Answered
append (not strcat) to combine strings with whitespace (\n)
app.DebugField.Value = append(app.DebugField.Value, "rew LB" + newline);

2 years ago | 0

Answered
How to change xlim to specific range only?
how to change xlim to specific to 0 :3:9 ylim to 30:30:300 That is not possible. xlim() expects to be passed a limit method (s...

2 years ago | 0

Answered
how can I compute MI (mutual information) for two time series?
https://www.mathworks.com/matlabcentral/fileexchange/13289-fast-mutual-information-of-two-images-or-signals https://www.mathwo...

2 years ago | 0

| accepted

Answered
Matlab live script - symbolic math looks terrible
Refering to https://www.mathworks.com/matlabcentral/answers/2143474-syms-suddenly-doesnt-work : You have installed a different ...

2 years ago | 0

| accepted

Answered
Syms suddenly doesnt work
Line 56 of syms in R2023b is comments -- the comments go to line 97. Therefore, you are not using the regular syms code. Perha...

2 years ago | 0

| accepted

Answered
Prevent changing values in GUI
But the problem is if I go inside the angle.Value and write some number not in range or limit of angle then even though the stat...

2 years ago | 0

Answered
Find overlap percentage of two plots
It is not clear to me that it makes sense to talk about "overlap" for stem plots. stem plots do not have any inherent dot size, ...

2 years ago | 0

Answered
Find Index of Selected Drop Down in another variable (App Designer)
The default Value property of uilistbox is the index of the item selected. If, though, the ItemsData property is set, then the V...

2 years ago | 0

Answered
Ho do I save the values of While at each hour?
Adjusted to save each iteration. A cell array is used because different iterations might run the while loop for different number...

2 years ago | 0

Answered
compute sum of polynomial square
syms x eqn = (1+x)^2 + (3+x)^2 +2*x expand(eqn)

2 years ago | 1

| accepted

Answered
How do I copy figure properties from one to another?
The below code sets all sensible properties. fig1 = openfig('Fig 1.fig'); fig2 = openfig('Fig 2.fig'); propnames = fieldnam...

2 years ago | 0

Answered
I want my code conditions checked every 1/2000th of a second, how can I do that?
You will not be able to pause() more accurately than 1/100 of a second on Windows. (On Mac it is about 1/1000 of a second.) The...

2 years ago | 0

Answered
Wrong font size for Default Axes Titles with set(groot,"DefaultAxesTitleFontSize")
Latex interpreter ignores font names. You control the font by using things like \mathrm \mathsf \mathit \textrm \textsf https...

2 years ago | 0

Answered
How to use all cores for running a Simulink model?
Simulink internally compiles down to a mix of algebraic and control operations. The algebraic operations are automatically opera...

2 years ago | 1

Answered
Reshape nested cell arrays into the a different nested cell array organization
No, there is no way to do it. Consider that you have your B 48 x 1 for each A 691 x 1. So there are 48*691 = 33168 different B....

2 years ago | 0

| accepted

Answered
Plotting two surface plots in the same figure using two different colormaps
You have two choices: Use seperate plotting axes. Each axes can have its own colormap. Make sure you pass the axes handle into ...

2 years ago | 0

Load more