Answered
Variables from diagram do not exist after run
The histogram handle h and its properties are tied to the existence of the histogram object in the figure window. If that histog...

3 years ago | 0

Answered
is it possible to make this code shorter?
One function that will be of use to you is cumsum. This will let you avoid variables with numbered names like r1, r2, r3, etc. I...

3 years ago | 0

Answered
Sim() error in MATLAB app designer
y=sim('app.var',p); %estimted This tries to call a version of the sim function that accepts a char vector as the first input...

3 years ago | 0

Answered
Working around Global Variables and Pointers
Since each Particle and each Room represent a unique physical object they should probably be handle classes with handle semantic...

3 years ago | 0

| accepted

Answered
Test of whether matrix is Symmetric Positive Definite is giving wrong result when matrix is not symmetric
From the chol documentation page: "If A is nonsymmetric , then chol treats the matrix as symmetric and uses only the diagonal an...

3 years ago | 1

| accepted

Answered
Error using * Inner matrix dimensions must agree.
F = 13; T = 0.1; n = (0:T:1); xn = cos(2*pi*F*n); t = linspace(-0.5, 1.5, 500); Now let's look at the terms you're multiply...

3 years ago | 0

Answered
Want to purchase the license for System composer
If you have general sales questions or would like a quote for this product please contact the Sales department using the Contact...

3 years ago | 0

Answered
solve a linear system of equations with several unknown parameters
syms f11 f12 f21 f22 g1 g2 V=[2 1 1; 4 1 1; 4 2 1; 2 2 1] ; F=[f11 f21;f12 f22;g1 g2]; U=[1...

3 years ago | 0

| accepted

Answered
how to interpolate outside the domain of x?
From Mark Twain's "Life on the Mississippi", a quote on the potential danger of extrapolation. "In the space of one hundred and...

3 years ago | 1

Answered
Index exceeds the number of array elements. Index must not exceed 620757.
What is element number 11 of the following vector? x = 1:10 The answer to the question is "it doesn't exist." In situations wh...

3 years ago | 0

Answered
Indexing a column, how to make it return corresponding column data instead of sample number?
Once you've computed those indices, you can use them to index into your array. voltage(inds, 1) But in this case you don't nee...

3 years ago | 0

Answered
Draw a line
If you're using release R2018b or later you can use the xline or yline functions.

3 years ago | 0

Answered
How to keep false as false, and not as zero
All the data in the array V must be the same data type. If x is not a logical array, the logical data will be converted to the c...

3 years ago | 1

Answered
Standalone Compiler Load ImageDataStore
See the first Tip on this documentation page. If there's no reference in the code itself that tells MATLAB Compiler it needs to ...

3 years ago | 0

Answered
How to add a constant value above a matrix in following code?
A = magic(4) B = [repmat(-999, 2, width(A)); A; repmat(Inf, 3, width(A))] This pads 2 rows containing the constant...

3 years ago | 0

Answered
How to decide, number or character!
If for whatever reason (homework?) you cannot just use isstrprop like @Stephen23 suggested, look at the documentation page for t...

3 years ago | 1

Answered
how to find the index of same datetime value
Truncate the datetime to the previous whole second then compare. d = datetime('now'); d.Format = d.Format + ".SSSSSS" d2 = da...

3 years ago | 1

Answered
Efficient construction of positive and negative matrix
Instead of creating a very large binary matrix in order to extract a handful of columns, why not use bitget? x = (0:7).' b = [...

3 years ago | 0

Answered
How to define a constant inside the 'fittype' function?
Yes, using the 'problem' name-value pair argument to both fittype and fit. See the "Create Fit Options and Fit Type Before Fitt...

3 years ago | 0

Answered
I can't use installed toolbox functions
According to its documentation page, the first input to the autobinning function must be a "Credit scorecard model, specified as...

3 years ago | 1

Answered
Array indices must be positive integers or logical values.
x = -6; %input value for following expression if x < -5 f(x) = 0; There's no such thing as element -6 of an array in MATL...

3 years ago | 0

Answered
Cant use Excel names to fprintf?
You can convert your cell array into a string array (assuming it contains text data) using string or into a numeric array (assum...

3 years ago | 0

Answered
is there a synonym of the function 'importdata' that supports code generation?
Opening the function list for MATLAB and filtering by Category "Data Import and Analysis" and Extended Capability "C/C++ Code Ge...

3 years ago | 0

| accepted

Answered
Contradictory results in command window with variable class and ischar function?
This code, class structure(8).timetotemp, is equivalent to: class('structure(8).timetotemp') If you had a variable array named...

3 years ago | 0

Answered
Join tables on closest dates
I'd probably try converting those table arrays to timetable arrays using table2timetable and then using synchronize to synchroni...

3 years ago | 0

Answered
Error with writing a function
If you're writing a function inside a function file and any function in your function file ends with an end then every function ...

3 years ago | 0

Answered
Replace many symbolic values with numerical values all at once
If you're generating this list of "many symbolic values" from something like a call to solve, call solve with one output (so you...

3 years ago | 0

| accepted

Answered
numerical error when dividing some identical complex number
Are you certain the two numbers you're using are identical down to the last bit, not just down to the last displayed digit? x =...

3 years ago | 0

Answered
Why does vpa give a sym class variable?
Another simpler point to what Walter Roberson said: we don't want you to have to check the class of the output returned by vpa e...

3 years ago | 0

Answered
Sudden changes in data values - how to detect?
Since this question was asked the ischange function has been added to MATLAB. Its short description is "Find abrupt changes in d...

3 years ago | 1

Load more