Answered
Plot not displaying lines
A line requires at least two points. Your x, x1, y, y1 values are scalars (single points). If you want to plot a marker instea...

4 years ago | 0

Answered
How to get a complement of a cell array in matlab?
This solution works if all elements of the 1D cell arrays 1x2 row vectors. V = {[1,2], [3,5], [5,6], [2,4],[3,7], [3,9], [8,9...

4 years ago | 0

| accepted

Answered
Clicking a button in a UIFigure that is not in focus only brings it the figure into focus, clicking it again causes the button action to happen twice.
> I have two interacting UIFigures. When the user clicks on a button in the figure that is not in focus, nothing happens other ...

4 years ago | 0

Answered
How to make the contour smooth other way(spline) and want to color a specific part
> 'cubicinterp' is 3rd interpolation by each point? Matlab documentation describes cubicinterp as Piecewise cubic interpolatio...

4 years ago | 0

| accepted

Answered
Why can't I open this saved .fig file in MATLAB live script?
Open the figure in Matlab, set visible = 'on', then save it. Use openfig(filename) in live editor. Note that the second inpu...

4 years ago | 0

Answered
get rid of series that contain useless values
Load the data use varfun to determine which columns of the table are cell-strings or strings use ismember find a list of key w...

4 years ago | 0

| accepted

Answered
Problem with running anova
It looks like you've shadowed matlab's gather function with a function or script of the same name. To see a list of functions...

4 years ago | 0

| accepted

Answered
Convert the cell array to matrix using for loop
Since you're dealing with scalars, instead of this line Data_of_collecting_fibers(i,j) = cell2mat(Dataofcollectingfibers(i,j)) ...

4 years ago | 0

Answered
How Does the Size of a Plot Annotation Text Box Matter?
Welcome to the convoluted world of annotation panes. You need to set the VerticalAlignment property to Bottom. figure plot...

4 years ago | 0

| accepted

Answered
Find all possible combinations of string array
Here are two options. Use combvec() from the Deep Learning Toolbox a = {'a','b','c','d'}; b = {'qq','rrr','ss'}; c = {'tuv',...

4 years ago | 1

| accepted

Answered
How can I animate the plot in the app designer UIAxes?
>How can I animate the plot in the app designer UIAxes? Animation in UIAxes is no different than animation in regular axes othe...

4 years ago | 1

| accepted

Answered
how to change the order of plots?
As of the current Matlab release (R2021b), it is not possible to control the uistack of objects on different sides of a yyaxis. ...

4 years ago | 0

| accepted

Answered
Splitting a table using varagin
The function definition in splitapply can also be an anonymous function in the form @(vars)func(vars) where vars can be a single...

4 years ago | 0

Answered
Reading an Excel table with both numbers and text
Use readtable which will read the data in as a table which is 2 dimentional but not a matrix. If you haven't used tables, you m...

4 years ago | 0

| accepted

Answered
How do I recommend fixes concerning typos in the "MATLAB Onramp" course?
Good question. You can click contact support > Report a bug > Tech Support > Product help, suggestions or documentation errors...

4 years ago | 0

Answered
Appdesigner get dropdown closing workaround
If you're closing the dropdown menu by selecting an option, you should include the reset actions in the DropDownValueChanged cal...

4 years ago | 1

| accepted

Answered
Setting array names from a table column name
Keep the data in a table The table already contains the data in a tidy format. Deconstructing the table into separate variable...

4 years ago | 0

Answered
How to adjust the size of components in appDesigner?
Sounds like you need to de-select the auto-resize option. https://www.mathworks.com/matlabcentral/answers/821460-deactive-auto...

4 years ago | 0

| accepted

Answered
Can't Get ThetaZeroLocation to Work Properly Using polarplot
You have to either hold the axes after setting ThetaZeroLocation or set ThetaZeroLocation after plotting. Otherwise, when you p...

4 years ago | 0

| accepted

Answered
How can I change the color of specific boxcharts?
It looks like you're either using "subplot" as a variable name of erroneously assigning boxchart handles to the subplot function...

4 years ago | 0

Answered
Finding rows with specific values
Use ismember. idx = ismember(T.month, [10,11,12,1,2,3]); T(idx,:)

4 years ago | 0

Answered
spectrogram - auto settings for zlim are too wide
It's likely that the spectrogram is using the full range of the colormap but you're only seeing a portion of the colormap range ...

4 years ago | 0

Answered
How to remove repeating characters in a character array?
See unique.

4 years ago | 0

| accepted

Answered
Why does legend goes to the back of the axes box in multiplots if you click it or move it with the mouse?
We can't reproduce the problem without having a minimal working example (e.g. something you provide us that we can run on our en...

4 years ago | 0

| accepted

Answered
GUI refuses to close after starting a loop within it, only closes when I attempt to close MATLAB entirely
At quick glance, it appears that when you press the on/off button the app enters a while-loop and there is no exit to the loop s...

4 years ago | 0

| accepted

Answered
Summation of colonns from an imported table
You should organize your data within a timetable and use the retime function. TT2 = retime(TT1,newTimeStep,method) TT2 = retim...

4 years ago | 1

Answered
How to I do sum my result value to a new result value, progressively? In a for loop
It sounds like you're describing a cumulative sum which does not need to be done within a loop. t = [100;100;100;100] ts = ...

4 years ago | 0

Answered
Loren's blog on datastore. How should I use counterSize and done?
> I am trying to use datastore in Matlab v2018b but it does not have 'partialread'. partialreadFcn is a function defined in Lor...

4 years ago | 0

Answered
Can Any one help me, how to import this function in matlab?
This uses a vector of inputs. f = @(x)(prod([x(1),x(2),x(3),x(5),x(3)-1])+x(4)) ./ (1 + x(2)^2 + x(3)^3); k = 5; % dem...

4 years ago | 1

| accepted

Answered
Define condition for both imaginary and real parts of numbers
x = pi + i if real(x)~=0 && imag(x)~=0 disp("YES") end

4 years ago | 0

| accepted

Load more