Respondida
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...

más de 3 años hace | 0

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

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 1

Respondida
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 ...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 1

Respondida
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...

más de 3 años hace | 1

Respondida
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 = [...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 1

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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...

más de 3 años hace | 0

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

más de 3 años hace | 0

Respondida
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 ...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

| aceptada

Respondida
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 =...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 0

Respondida
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...

más de 3 años hace | 1

Respondida
Check for incorrect argument data type or missing argument in call to function 'log'.
I suspect your image variable (which you probably want to rename, as image already has a meaning in MATLAB) is one of the eight ...

más de 3 años hace | 0

Respondida
Generating the laplacian for a sub-graph that still reflects the connectivity of the overall graph
Your comment refers to "the first figure" but no figures are attached to this post nor are there any linked documents including ...

más de 3 años hace | 0

| aceptada

Respondida
Question on DDE23
Nowhere in your ddefunc function do you define the variables a,b, etc. The fact that you've defined them in the script or functi...

más de 3 años hace | 1

Respondida
I dont know why i keep getting an Invalid operator
See the "Syntax for Function Definition" section on this documentation page. When you define a function the input arguments must...

más de 3 años hace | 0

Respondida
Can one extract a unit of time from a duration object?
MATLAB will try to select a good format for the duration object based on the data with which it was created. But if you want all...

más de 3 años hace | 0

| aceptada

Respondida
Detect all local minimum and remove them
Another approach similar to John D'Errico's, but automating the detection and filling of the local minima: x = [280 295 310 325...

más de 3 años hace | 0

Respondida
why matlab is using all cores when no parallel pool is created
Many operations in MATLAB, when it would be beneficial to use multiple threads in their computation, are multithreaded even with...

más de 3 años hace | 4

| aceptada

Respondida
Symbolic math tool - Seperate numbers from symbols
Depending what else you're planning to do with this result you could use symunit. I'm assuming mass and m are in units of kilogr...

más de 3 años hace | 0

| aceptada

Respondida
How can I solve N (N>100) cubic equations parallelly?
Solving the roots of a cubic polynomial isn't very computationally intensive. I wouldn't be at all surprised if whatever benefit...

más de 3 años hace | 0

Respondida
Saving a structure element as a .mat file
If you want to extract some but not all of the variables stored in a MAT-file into a separate file, I'd use load to read just th...

más de 3 años hace | 0

Cargar más