Answered
Print user-defined error messages as a table
msg = sprintf(['Polygon not supported. List of supported polygons is:\n' ... ' Triangle\n Square\n Pentagon\n Hexagon\n Hep...

6 years ago | 0

| accepted

Answered
First cell in array is empty
oops! Typo... should be for i = 1:length(theta) % ^^ end Two more unrelated tips: Always pre-allocate your lo...

6 years ago | 1

| accepted

Answered
How to filter a cell array filled with strings?
This will return a logical array the same size as 'A' where TRUE values indicate elements of A that meet the following requireme...

6 years ago | 1

| accepted

Answered
Why is format long providing a strange result?
It's because of the way you're combing two variables in the output display. Look at the last iteration of your 2nd for-loop. ...

6 years ago | 0

Answered
Swapping entries in column of table
I'm not sure why you're using string characters instead of numbers but I'll assume you have a reason for that. Here's how to ide...

6 years ago | 0

| accepted

Answered
What does the 'imfuse' output mean?
Regarding the line of code Fused = imfuse(Image3, Image4, 'falsecolor'); For the falsecolor method, by default, Fused is a com...

6 years ago | 1

Answered
STROOP TEST- COGENT
The handle to the text object and the handle to the "square" (not sure what you mean here, it could be a rectangle object, a pat...

6 years ago | 0

| accepted

Answered
On Startup: function name warning
None of the toolboxes are crashing - those are just warnings that you've got two functions with the same name. Don't delete a...

6 years ago | 0

Answered
moving scroll index in a ui figure
Update: Matlab R2021a and later Starting in Matlab R2021a, you can programmatically scroll to any row, column, or cell of a uit...

6 years ago | 1

| accepted

Answered
UIFigure Keyboard control update
"I am looking for an approach on how to provide the input control for the uifigure" Idea 1: add buttons to your App One approa...

6 years ago | 1

| accepted

Answered
User input has to be a natural number between 1 to 15
Simply add the mod() part to your while requirement. mod(x,1)==0 checks that x is an integer. I also clarified the instrutio...

6 years ago | 1

| accepted

Answered
How can I use Textbox input from GUI in a separate script?
"I want to use the input of the textbox of my gui which i have created with guide, in a seperate Matlab script" There are sever...

6 years ago | 0

Answered
Cut timetable data following certain conditions
Well, that took a little more time than I anticipated! Here's a demo with inline comments explaining the details. I added a...

6 years ago | 0

| accepted

Answered
How can i write recursive function using midpoint equation 3d coordinate system?
This solution creates an anonymous function midPointFcn() that receives two inputs A and B which are both (x,y,z) coordinates of...

6 years ago | 0

| accepted

Answered
App missing in example file
The example requires the Phased Array System Toolbox as is explained in the set up section of the example. A similar (or exac...

6 years ago | 0

Answered
Adding transparency when filling color in plots
You can specify any of the patch properties to change your patch objects. To change transparency, set the FaceAlpha value (and ...

6 years ago | 4

| accepted

Answered
How to evaluate the performance of K-means?
"...where wik=1 for data point xi..." That would suggest that m is the number of data points since that summation is iterating ...

6 years ago | 0

| accepted

Answered
How to draw line with a mouse in the UI of the UIAxes in App Designer?
It works fine in r2019b; there are quite a few limitations to UIAxes prior to r2019b which may be causing the problem. ...

6 years ago | 1

| accepted

Answered
Why is the out-printed string displaying the wrong values?
convexHull is a 32-bit unsigned integer array. This line below changes the values of convexHull. coordPoints = [convexHull,c...

6 years ago | 0

| accepted

Answered
bar figure with stacked
You've got an error/typo in reordercats(). x = categorical({'Python','Java',' C++','Matlab', 'C','C#','Visual Basic','Processin...

6 years ago | 0

| accepted

Answered
How to replace multiple duplicate rows with single row?
x = [0 10 10 10 10 10 14 6 10 10 10 4]; x([1;diff(x)]==0) = []; %...

6 years ago | 0

| accepted

Answered
How to find the nearest value of a number by comparing two nested cell arrays?
pairs is a cell array the same size as idp and qq. Each element is a 1x2 vector of the values in qq that are just below and abov...

6 years ago | 1

| accepted

Answered
How to create a 2x2 matrix?
Use curly brackets instead of square brackets. M = {h(1,:) h(2,:); h(2,:) h(1,:)};

6 years ago | 0

| accepted

Answered
In Matlab can I directly modify a value in a containers.map when the value is the element of an array?
You could add a local function at the bottom of the m-file that does the dirty work. M = plusOne(M,'Li',i); function mapO...

6 years ago | 0

| accepted

Answered
Undefined Variable Function 'dlarray' although the DL Toolbox already installed
dlarray() was released in r2019b. It looks like you're using r2019a so you won't have access to that function, unfortunately.

6 years ago | 0

| accepted

Answered
App designer: empty figure appears when running GUI with axes plot.
Specify the axis handle hold(app.Axis_1,'on')

6 years ago | 1

| accepted

Answered
Sum Matrix excluding certain values
y = sum(MatrixA(MatrixA > 3))

6 years ago | 1

| accepted

Answered
how to change the XTick of heatmap?
I'm not sure what rule you were following to chose the x-ticks in your question (Jan1971,Jan 1972,...Dec 1986) but here's how t...

6 years ago | 1

| accepted

Answered
Can you have multiple animations running at the same time?
"I am wondering if it is possible to have multiple dots travel down the screen at the same time, but have the times offset?" It...

6 years ago | 1

| accepted

Answered
Filling missing elements in a matrix.
Use F = fillmissing(A,method); requires >=r2016b Here's a demo % Create a 20x10 cell array of integer values % and replace 1...

6 years ago | 1

| accepted

Load more