Answered
Problem with if statements
Don't define a large number of variables whose names match the symbols for the elements and use a large collection of if stateme...

12 dagar ago | 1

Answered
contradicting date identifier definitions in datestr and datetime
That's correct. This is mentioned in the description of the Format property on the datetime documentation page. If I recall cor...

12 dagar ago | 0

| accepted

Answered
How to perform these matrix calculations?
See the diff and cumsum functions.

12 dagar ago | 2

Answered
Error-Variable might be used before it is defined
This would work if SpeedMaxOpt is a Constant property of the Global class or a Static method of that class that can be called wi...

13 dagar ago | 0

| accepted

Answered
Hist3 zero enteries
Instead of using hist3 I recommend you use histogram2 instead. It has some properties, including Normalization and ShowEmptyBins...

14 dagar ago | 0

Answered
I am getting this preallocation warning
This is a Code Analyzer warning not a run-time warning. If you're not sure what preallocation is, why it can be important, or h...

14 dagar ago | 1

Answered
How do I insert a picture into a script?
If your script is a live script that you have open in the Live Editor, select the Insert tab of the Toolstrip then click the Ima...

14 dagar ago | 0

| accepted

Answered
Datetime to string format issue
Don't use datestr. As its documentation page states, it is not recommended. Use string or char instead. dt = datetime('now'); ...

14 dagar ago | 0

| accepted

Answered
How to manually move (smoothly) a set of evenly spaced xlines
With your clarifying picture there may be another possibility. You could just put the xline objects in their required position a...

15 dagar ago | 1

Answered
How to manually move (smoothly) a set of evenly spaced xlines
While you can't create a vector of xline objects in one call in release R2020a, you can store those handles in an array. axis([...

15 dagar ago | 1

| accepted

Answered
operator > is not supported for operands type of cell
None of the relational operators are defined for cell arrays. A cell array can contain basically any type of data you can create...

15 dagar ago | 2

| accepted

Answered
Suggest an Alternate for Nonzero (nnz) built-in function
You can keep track of the next row to be filled. When you add data to a row, increment that tracking variable. x = zeros(6, 3);...

16 dagar ago | 0

Answered
Error using vertcat Dimensions of arrays being concatenated are not consistent.
What is the full and exact text of the warning and/or error messages you receive? Please show us all the text displayed in orang...

16 dagar ago | 0

Answered
Making class accessible without having its .m file in current folder
In order to create or work with an instance of the class, it must be accessible to MATLAB. This means it must be in the "current...

16 dagar ago | 0

| accepted

Answered
MY MATLAB KEEPS ON CRASHING ON MY MAC. ITS THE 2022b
If by "crash" you mean MATLAB shows a stack trace and/or immediately disappears, please send the crash log file to MathWorks Tec...

16 dagar ago | 0

| accepted

Answered
How can i download this model example from mathworks?
Have you installed the Support Package using the instructions on this documentation page? When I did I was able to open that exa...

16 dagar ago | 0

| accepted

Answered
Does the base Matlab have something similar to Java's command 'setDefaultCloseOperation'?
If you want to detect if a handle is a valid Handle Graphics object, use ishghandle. f = figure; f2 = figure; x = 42; close(...

16 dagar ago | 0

Answered
Can you help me write a rubik algorithm using Fridrich method?
Cleve Moler has written about the Rubik's Cube on a number of occasions in his blog. See a list of search results for Rubik. If...

16 dagar ago | 0

Answered
The plot of cosine is not shown
What multiples of pi are you taking the cosine of? t = -2:0.01:2; A = 2*100*t; What's the largest difference in absolute valu...

17 dagar ago | 0

Answered
Matrix index is out of range for deletion.
What happens if you try to delete the 11th element of a vector with 10 elements? try x = 1:10; x(11) = []; catch ME ...

17 dagar ago | 0

| accepted

Answered
Singular value decomposition method for solving least squares problems
In this case does not represent summation. One of the ways in which the singular value decomposition is represented is: "Spe...

17 dagar ago | 1

Answered
Why does histogram gives issues? I rephrased my question
x = rand(1, 1e5)*1e-5; ax = axes; Specify bins edges with logarithmic spacing. h = histogram(ax, x, 10.^(-10:-5)); Set the X...

17 dagar ago | 0

Answered
Getting different values when indexing with islocalmax and find
The islocalmax function is not the correct function to use here. Note that in the code below that there are some rows of ind tha...

18 dagar ago | 0

Answered
How to merge very close bins in histogram/hiscounts
Once you've binned your data once, use whatever mechanism you want to determine which bin edges separate bins you want to merge....

18 dagar ago | 0

Answered
Integers in Arrays Give Strange Result
For concatenation see this documentation page. If you concatenate one or more integer arrays with one or more double arrays, the...

19 dagar ago | 0

| accepted

Answered
what is inline(vectorize function), also why to use fliplr for this?
Do not use inline. Its use has been discouraged for probably around 15 years now. To convert a piece of text data to something ...

19 dagar ago | 1

Answered
Table column of strings to a matrix.
A=["[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[0 0 0 0 0 0 0 0]";"[1 1 1 1 1 1 1 1]"] A2 = erase(A, ["[", "]"]) double(split(A2,...

19 dagar ago | 2

Answered
How can I get all properties of some object of UIAXES app designer
If I have a book sitting on a table and I touch the cover of the book, have I touched the table? No. So things that are concerne...

19 dagar ago | 0

Answered
Custom exponential fit doesn't seem to work
Consider specifying the Normalize name-value pair argument in your fit call to normalize the X data. In my example below I'll us...

19 dagar ago | 0

Answered
apparently the command rmoutliers does not do the job correctly
Rather than going directly to rmoutliers I recommend using isoutlier to detect the outliers then process the resulting logical a...

19 dagar ago | 0

| accepted

Load more