Answered
Symbolic indefinite integral of piecewise function gives wrong results
I disagree that the second attached image "obviously is not a correct antiderivative of the given function." If you take its de...

1 year ago | 1

Answered
How to generate sequenced file names with file extensions?
See the <https://www.mathworks.com/help/matlab/ref/num2str.html#btf97wr documentation for num2str> to find the |formatSpec| inpu...

1 year ago | 1

| accepted

Answered
How to preallocate to decrease run time?
You can use |unique| to make your loop more robust. Then, logical indexing is much better than the |find| you've included. In ...

1 year ago | 0

| accepted

Answered
AppDesigner UIListBox Multi-Select Corrupts .MLAPP File
A second approach that somebody out there might have more luck with is to hack the .MLAPP file directly. I know it's just a .ZI...

1 year ago | 0

Answered
AppDesigner UIListBox Multi-Select Corrupts .MLAPP File
It isn't the best, but I found out the "corrupted" .MLAPP files will open in newer releases just fine. This doesn't help if you...

1 year ago | 1

Answered
Plotting very slow and took long time to launch plot tool
Given information from your comments that y is 50x1801, the command plot(x,y,'LineWidth',2); Will already plot *all* 50 ...

1 year ago | 1

Answered
How to retrieve an extension type based on the location of a folder that is storing images?
The |ext| has to be empty, you've used |uigetdir| and directories can't have extensions. Your best bet is do a quick |dir| on t...

1 year ago | 0

Answered
How to write a char variable as filename in xlswrite
xlswrite([PST],'.xlsx',data,1,'A1') Passes '.xlsx' as the second input argument to |xlswrite|. You want to concatenate it ...

1 year ago | 0

| accepted

Answered
Assign a "double-column" to a "cell-coloumn"
You can replace _one entire_ column with NaN very simply: tableVariable.VarWithErrors = NaN(height(tableVariable),1); To...

1 year ago | 0

| accepted

Answered
The documentation for the Simulink Generic Battery Model seems wrong
That bug report link asks me to log into my MathWorks account, and doesn't say anything about SalesForce. After logging in, the...

1 year ago | 0

Answered
How to make a modal window generated during openingFcn on top of the GUIDE window
Use |uiwait|. h = warndlg(. . .); uiwait(h); %%% These commands won't execute until warndlg is closed %%% I.e., yo...

1 year ago | 0

| accepted

Answered
Editor and command windows next to each other, Part 3
Preferences (including layouts) are user-specific. As Paolo explained, your layout is already saved every time MATLAB closes (p...

1 year ago | 0

Answered
Problem Diagnosing Adding Vectors to Cell Array
Can't track for sure, but it looks like |Q| is a scalar. I think you want to replace: for j = 1:length(Q)-1 % length(Q) = ...

1 year ago | 0

| accepted

Answered
How to correct this?
If the first non-comment line is not a |function| declaration (or a few other options such as |classdef|), the file is a _script...

1 year ago | 0

Answered
Extracting Exponential Numbers from Cell Arrays
You're already using |textscan|, did you try the <https://www.mathworks.com/help/matlab/ref/textscan.html?s_tid=srchtitle#btg0ke...

1 year ago | 0

| accepted

Answered
Matlab doesn't change MarkerSize
The unit of 'MarkerSize' is 'points' which is typically 1/72 inch. Depending on your OS, there are usually 96 pixels per inch. ...

1 year ago | 2

| accepted

Answered
uisetcolor -- IPC process exited. Exit code: 127
See <https://www.mathworks.com/matlabcentral/answers/321269-opening-uisetcolor-extremely-slow-r2016b here> for reverting to the ...

1 year ago | 1

Answered
plotyy: changing the line-style to 'o--'
'o--' and others are shortcut inputs to |plot| commands when you *don't* pass a parameter. In this case, you are specifying a _...

1 year ago | 2

| accepted

Answered
how to get combination
If you have the Symbolic Math Toolbox, you can use the |<https://www.mathworks.com/help/symbolic/divisors.html divisors>| functi...

1 year ago | 0

Answered
Error scatter plot time vs wind speed (data from a table)
You're misunderstanding how MATLAB operates. Functions like |table2array| don't manipulate the variable _in place_, they return...

1 year ago | 0

Answered
Error when trying to change the colour of a line in a figure
_Error using matlab.ui.internal.dialog.WebColorChooser/show (line 72)_ indicates you're using |uisetcolor|, and that's causing t...

1 year ago | 1

| accepted

Answered
How to show an individual YTickLabel to the right of the single Y axis?
It isn't elegant, but space pad the tick label until it shows up better.

1 year ago | 0

Answered
How to adjust the locations of characters in biplot?
The output of |biplot| is an array of handles. In there will be the variable labels. Each has a _position_ property you can man...

1 year ago | 0

Answered
Why isn't my loop working?
Purely a guess, you goofed up some indexing: t = line(3)/1000; % <-- Recreates a new "t" as a scalar every loop iteration ...

1 year ago | 0

Answered
Hello, I'd like to extracts a cell range from an excel file, but I'm running into trouble.
Have you read the <https://www.mathworks.com/help/matlab/ref/csvread.html#btrbcf4-1 documentation> for the inputs to |csvread|? ...

1 year ago | 0

Answered
Update dot in plot according to sliders
I forget which release introduced |MarkerIndices| for plots, but I think that's exactly what you're going for. You don't need a...

1 year ago | 1

Answered
A way to reference questions and blog articles from your profile
Isn't that what _following_ a question does? Go to _My MATLAB Answers_ --> _Manage Following_ and boom, personalized list of qu...

1 year ago | 1

Answered
Merging two categorical columns using a rule
Make your categorical array ordinal (with "not" as the lowest value), then use |c = max(a,b)|. This is only guaranteed to work ...

1 year ago | 0

Answered
How to add a polygon to UIAxes in appdesigner?
ps = polyshape([0,0,.13,.13],[26,124,124,26]); % This is still a rectangle though... pg = plot(uiaxes,ps);

1 year ago | 0

Answered
How to use publish to create a word document. THANK YOU
Reading <https://www.mathworks.com/help/releases/R2017b/matlab/ref/publish.html?searchHighlight=publish&s_tid=doc_srchtitle#desc...

1 year ago | 0

| accepted

Load more