Answered
Help with axes labels on histogram plot
If you want the labels to be only in the center of the bars, use the BinEdges property of the histogram to compute where the tic...

29 days ago | 0

Answered
Problem to call fitcecoc with Matlab runtime
If you are attempting to compile code using MATLAB Compiler that calls load to load an object from a MAT-file and there is no in...

29 days ago | 0

Answered
MATLAB built-in examples not opening and giving error
According to the Release Notes for Simscape Electrical, the names of the example models and/or the way you access them changed i...

1 month ago | 1

| accepted

Answered
Load data and store in workspace in individual variables
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes. Should you do this? The general consensus ...

1 month ago | 0

Answered
"Invalid use of operator." doesn't go even after trying various solutions :(
That doesn't match any of the allowed syntaxes shown on the for keyword documentation page. If you want the code to run only if...

1 month ago | 0

Answered
Error using sym/subs Too many input arguments. Error in mx_model (line 176) f = subs(f, cup,cu,0);
In the past the subs function for symbolic expressions did accept four inputs. The last input controlled whether or not we tried...

1 month ago | 1

Answered
Error Saving figure: Error using sprintf: Conversion to text from matlab.ui.Figure is not possible.
Your full error message references line 63 in the savefig function, which in the savefig function included in MATLAB: which -al...

1 month ago | 3

| accepted

Answered
while closing the GUI in MATLAB 23a give following error
You could wrap that set call in a try / catch block and check if the handle to the text box isvalid in the catch block. If it is...

1 month ago | 1

| accepted

Answered
How to build polynomial with cscvn function coeffs?
If you want to evaluate the spline, don't try to make polynomials. Just use the output argument from your call to cscvn with the...

1 month ago | 0

Answered
Array indices must be positive integers or logical values.
Did you mean r*(1-tau) instead of r(1-tau) in the command in the innermost for loop?

1 month ago | 0

| accepted

Answered
External Users Viewing Fig file
No, as far as I'm aware there is no stand-alone viewer for .fig files. One approach you could use to allow your users without MA...

1 month ago | 0

Answered
generate all possible upper triangular matricies with variables
Since you're using release R2023b, you can use the combinations function introduced in release R2023a. values = [0, 1, 2]; g =...

1 month ago | 0

Answered
Subs does not calculate result
If you want to see or obtain the floating point approximation to the symbolic answer, use the double or vpa functions or change ...

1 month ago | 0

Answered
Extract time (hour+minute+second) from datetime vector
If you can use a datetime array instead of serial date numbers (or convert the serial date numbers to datetime): rightnow = dat...

1 month ago | 0

Answered
use fmincon with 0<x1<x2<x3
Another possible solution is to redefine your code in terms of d(1), d(2), d(3), etc. Constrain all the elements of the d vector...

1 month ago | 0

Answered
Math operations with Double or Uint8
What is the range of numbers you can store in an uint8 array? [intmin('uint8'), intmax('uint8')] If the results of computation...

1 month ago | 1

| accepted

Answered
Unexpected result using cellfun with 'size' as first argument on string array
Not a bug. On the documentation page for the cellfun function, in the description of the func input argument, there is a sectio...

1 month ago | 1

Answered
How to replace statements in Matlab functions for code generation?
Are you hoping to do code replacement? Or are you thinking of something smaller like checking coder.target to see if you're in M...

2 months ago | 0

Answered
Clean reinstall of Matlab R2023b on Ubuntu
Without seeing a crash log file or getting more information about what happens when you try to launch MATLAB, I think this is go...

2 months ago | 0

Answered
put index to symbol
It's not clear to me exactly what you're asking, but as a guess if you're asking if you can you dynamically create variables wit...

2 months ago | 1

Answered
error multiplying datetime (now) by 100 with *
Multiplication is not defined for datetime objects. What would 2 times today represent if it were defined? I don't think there's...

2 months ago | 0

Answered
readtable with datetime, format problem
Try calling detectImportOptions on the file to let MATLAB try to figure out the format of the file. Check how it thinks the date...

2 months ago | 1

Answered
How to have class and inheritance
This page is not itself a PDF, but there is a version of this documentation page showing the documented graphics object hierarch...

2 months ago | 1

Answered
Error using () Subscripting into a table...
Line 29 of the dot.m included with MATLAB doesn't match what you showed. MATLAB Answers uses release R2023b (Update 2, but I don...

2 months ago | 0

Answered
Not enough input arguments Been over the code so much need fresh eyes
How does fmincon call the nonlinear constraint function? Specifically, how many inputs does it pass into that function? From tha...

2 months ago | 0

Answered
Save text of script in .mat file?
Rather than trying to put (potentially a large amount of) code in your MAT-file, why not create a struct or object with your par...

2 months ago | 1

Answered
Create a graph with several isolated nodes and a few links
Your code would work with one minor addition, a line that adds the additional nodes to the graph that are not present in the s a...

2 months ago | 1

| accepted

Answered
How to fix error:Unrecognized method, property, or field 'imageFilename' for class 'groundTruth'. ?
Nowhere on the documentation page for the groundTruth object does the identifier "imageFilename" appear (except in an example as...

2 months ago | 0

Answered
Problem to use array of subclasses derived from superclass
Using a heterogenous array is the approach I'd use. I don't know if you're still reading this, but could you show what you mean ...

2 months ago | 0

Answered
Empty sym: 0-by-1
Let's look at the equations you're trying to solve. syms V P=[0.98 1.97 4.93 9.86 49.36 98.69]; %atm T=[573 573 573 573 573 ...

2 months ago | 0

Load more