Answered
Error Using Abs matlab function: check for incorrect argument data type or missing argument in call to function 'abs'
abs is not supported for optimization variables. However, sqrt and squaring are supported.

4 years ago | 0

| accepted

Answered
Can MATLAB 2020b run on a Surface Pro X or Pro 8
Yes MATLAB should run on the Pro 8. It will not run on the SQ2, or at least not natively; it certainly would not be supported...

4 years ago | 0

| accepted

Answered
How to convert a sym variable to an ordinary variable?
symbolic variables can be converted to numeric only if they have no unbound variables and all expressions with bound variables (...

4 years ago | 0

| accepted

Answered
Looping through object array, possible to get an iterator to index into the object array?
When you "for" name=array then matlab iterates over the columns of the array, setting the variable to each column in turn. So tm...

4 years ago | 0

Answered
Why am I not getting output in the combinations of salts field?
You assign string into C and copy that to combination of salts, and then put that as the second entry in the cell. The cell gets...

4 years ago | 0

Answered
how can i extract A= rand([3.85 9.22],5,1) without getting an error
rand(SIZE) * (UPPER - LOWER) + LOWER

4 years ago | 1

| accepted

Answered
Simplifying a symbolic expression
You are trying to find the symbolic roots of a degree 5 polynomial. It does not happen to be one of the quintic polynomials that...

4 years ago | 0

Answered
How can I change my username?
The first thing to do is run the Deactivation executable that you will find in your MATLAB installation directory. Then, change...

4 years ago | 0

Answered
Legend for multiple plots varying parameters
% matlab and maple for theta plot for different xi values figure subplot(2,1,1) hold on for ixi = 1:2 xi_part = "xi = "...

4 years ago | 0

| accepted

Answered
Wcompress for 1D data
but i notice that the size of the data file after and before the wdencmp is the same, What you are writing to the file is the r...

4 years ago | 0

| accepted

Answered
How to permute elements of jth column of a matrix iteratively
A=[1,2,3 ; 7,8,9 ; 13,14,15] perms_of_(A) function perms = perms_of_(A) [rows, cols] = size(A); perms = repmat(A, ...

4 years ago | 0

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
Error in cell2mat (line 46) M(i,j) = C{i,j}; That line of code does not exist in Mathworks cell2mat, at least not ...

4 years ago | 0

Answered
please help me for , create a plot of the two functions sin(1.5x) and cos(2x) from 0 to 4pi
y2=cosd(2x); There are absolutely *no* places in MATLAB that permit implicit multiplication. If you want to multiply two th...

4 years ago | 0

| accepted

Answered
Unwanted items showing up in plot legend
Record the handle of all scatter() calls in an array. Pass that array to legend()

4 years ago | 0

| accepted

Answered
Matlab code for solving nonlinear equations
In the general case that could be difficult and time consuming. For example the nonlinear system might be describing Elliptic Cu...

4 years ago | 1

Answered
Loading multiple DICOM images in App Designer and switching between them,
I suggest that you use MultiSelect with uigetfile. Test the results to see if isnumeric(fn) and if so then the user cancel. Then...

4 years ago | 0

| accepted

Answered
How to solve differential equation including derivative of eigenvalue of tensor?
You need to construct the formula for the eigenvalues of the derivative based on the equation for A. As you have a 3x3 matrix th...

4 years ago | 1

Answered
Using regexp to parse plot's LineSpec
Shapes and colors in linespec may be given in full or in any leading prefix of the word, and the parts can be run together with ...

4 years ago | 0

| accepted

Answered
load function: how do you to skip lines in ASCII File that generate errors?
No. load() of a text file is documented as only being guaranteed to work for files saved with save -ascii In practice load() ...

4 years ago | 0

Answered
Problem in evaluating the value of the derivative of multivariable function
matlabFunction(diff(f1, x), 'vars', [x, y] )

4 years ago | 0

| accepted

Answered
Symbolic Sum to find a general expression for arbitrary n terms and arbitrary variable definitions
You cannot do that in MATLAB for symbolic limits. For specific limit, n being a given positive integer, then you would not us...

4 years ago | 0

Answered
initialize complex values in column vector
Suppose that you had coded [1 0 -1] then how many values would you expect as a result? Is that to be interpreted as ([(1...

4 years ago | 0

Answered
why a message about license is show every time i run MATLAB"??
The message appears every time you start MATLAB because if it only appeared every second or third time you started MATLAB then y...

4 years ago | 0

| accepted

Answered
abs function equivalent in c++
https://cplusplus.com/reference/cstdlib/abs/ In C++ abs() is overloaded and for double precision will call fabs() fabs() w...

4 years ago | 0

Answered
How to use three differential equation in pplane in Matlab?
dfield is for one differential equation, pplane is for two differential equations, for studying phase planes. The software is...

4 years ago | 0

Answered
replace diff function with for loop and if structures
Using if structures is pretty useless there. The calculation is very straight forward, and the only relevant questions are: do ...

4 years ago | 0

Answered
Consider particle ā€œPā€ having random walk in 1-D, Let N steps of equal length be taken along a line.
Encode a step to the left as binary 0. Encode a step to the right as binary 1. Any particular random walk of N steps can then be...

4 years ago | 0

Answered
How could i merge spectrograms ??
No, it is not possible to merge spectrogram(); see the technical discussion at https://www.mathworks.com/matlabcentral/answers/1...

4 years ago | 0

Answered
Discarding certain values of a variable.
if (Hs<0.2) | (Hs>0.5) Hs=0; else Hs = [Hs 4*sqrt(sum(sum(s)))]; end In the first condition...

4 years ago | 1

Answered
Any comment to speed up the speed of caculation of symbolic loops having Legendre polynomials?
Wxy2(r) = W(i, j, 2, r)*legendreP(i, zeta__2)*legendreP(j, eta__2)*q(r, 1) + Wxy2(r); Wxy3(r) =...

4 years ago | 1

| accepted

Load more