Answered
Matlab only runs a line is I pause before or in debug mode.
Put a |drawnow| on the preceding line which will forcefully flush the event queue. Debug, pause, do this implicitly. Also, c...

8 years ago | 0

| accepted

Answered
How do I implement a timer function that updates a static text box within my GUI?
You need to pass handles into the callback @(t,e)timerCallback(t,e,handles) Also, why aren't you using app designer? ...

8 years ago | 0

| accepted

Answered
Hourly, Daily, Weekly, averages with accumarray and unique
Use the newer and easier retime function. Turn your table into a timetable (table2timetable) and then just call retime with the...

8 years ago | 2

| accepted

Answered
Continuous tracking of 'LocationChanged' event of figure
It seems to be firing and responding correctly for me (18a, Windows) as I drag fig1 around. posOffset = [500 0]; % position...

8 years ago | 5

| accepted

Answered
How do you label every other tick?
Something along these lines: plot(1:10); ax = gca; %% labels = string(ax.XAxis.TickLabels); % extract labels(2:2:end) =...

8 years ago | 4

| accepted

Answered
how to validate edittext to accept only integers between 25 to 100
Use appdesigner and the numeric edit field with upper and lower limits. <https://www.mathworks.com/help/matlab/app-designer.h...

8 years ago | 1

Answered
Sinogram reconstruction with fourier transform
iradon or ifanbeam?

8 years ago | 0

Answered
Bed of Nails from vectors - inverse of find()?
for ii = 1:size(x, 1) x(ii, a(ii,:)) = 1; end

8 years ago | 0

Answered
Finding the first occurance using interp1
Use |cummax| and |cummin| to find the the first set of points that cross 0.2. Then interp just them. x = 1:10 y = sin(x...

8 years ago | 0

Answered
Is it possible to generate/update MATLAB toolbox project file (*.prj) programmatically?
<https://www.mathworks.com/help/releases/R2017b/matlab/ref/matlab.addons.toolbox.packagetoolbox.html> and friends. I don't kn...

8 years ago | 1

Answered
Questions about using ImageDataStore and only some subfolders in a folder
Build files with dir. For example, all pngs at this level and below. Then strip out any you don't want or keep just the ones y...

8 years ago | 0

Answered
What program should I use?
Use app designer. It can support everything you want and is where all of MathWorks' user interface development is focused.

8 years ago | 1

Answered
I'm a noob. Can anyone make this simpler or more efficient?
numgrade = 77; graderanges = [0 60:10:100]; grades = ['F' 'D':-1:'A']; let_grade = grades(discretize(numgrade, graderanges)...

8 years ago | 1

Answered
fmincon, find integer values as optimal values
fmincon is not designed to deal with integer x values. You should try ga() which has an IntCon option or patternsearch() with a...

8 years ago | 0

| accepted

Answered
How does matlab handle bounds in Nonlinear Least Square problems?
It doesn't generate candidate points that fall outside of the bounds. See algorithms and references here: <https://www.mat...

8 years ago | 1

| accepted

Answered
Optimize with handling an objective function as "Black Box"
The pattern you have there looks like it should work and the idea is fine. Though I would probably recommend |patternsearch| ...

8 years ago | 0

| accepted

Answered
How to open multiple files from a folder in matlab and merge the results in a single table.
readall(datastore(your_directory))

8 years ago | 1

Answered
histcounts error in place of histc
The edges needs to be at least two elements. I usually do this to make one side (either negative or positive depending on conte...

8 years ago | 1

Answered
How can I use the interpreted MATLAB block in simulink to return a vector?
Just use a MATLAB function block.

8 years ago | 0

Answered
How do I properly call a public function within an App Designer generated class?
s = SoundGen_GUI GUI_plot(s, ssm) % or s.GUI_plot(ssm)

8 years ago | 2

| accepted

Answered
How do I execute a function only one time in Simulink?
Perhaps: <https://www.mathworks.com/help/releases/R2017b/simulink/slref/functioncallsubsystem.html>

8 years ago | 0

Answered
Double integration in simulink
integral2(@(x,y)10+zeros(size(x)), 0, 10, 0, 10)

8 years ago | 0

Answered
Outputting list of times and corresponding voltages
fplot(@(t)5*sin(3*t),[0 10])

8 years ago | 0

Answered
Upgrading from 2014b to 2017b
Also in R2017b there is now a code compatibility report. I'd recommend doing a first pass with it as well as reading the releas...

8 years ago | 0

Answered
How to make a random number generator with a normal distribution in matlab
Use |makedist| to make a distribution object with the appropriate parameters and then call |random| on it" <https://www.mathw...

8 years ago | 1

Answered
How to change XTick Labels in a heatmap
The tick labels are deceptively called *data. figure; my_matrix = rand(3); heatmap(my_matrix, 'Colormap', parula(3), 'Col...

8 years ago | 5

| accepted

Answered
Test case generation using path coverage
<https://www.mathworks.com/products/sldesignverifier.html>

8 years ago | 0

Answered
How To listen to a list of properties and call a method when a property of that list changes value?
You have to build the meta property list from the metaclass: p = IHaveProps; mc = metaclass(p); metaprops = [mc(:).Pr...

8 years ago | 0

| accepted

Answered
Distributed computing - job still 'running' when actually finished. Why?
For 1) It's gotten a lot better and stable in more recent releases.

8 years ago | 0

Answered
'Effective' Pulling without merge or commandline Git?
You may have more luck on Stack Overflow for git workflows. What are you using for the remote? My team uses an internal gitl...

8 years ago | 1

Load more