Answered

Invalid indexing or function definition

I suspect that you accidentally created a variable named solve

Invalid indexing or function definition

I suspect that you accidentally created a variable named solve

1 hour ago | 0

Answered

accumarray works with made up data, but not real data

OT = unique(matA(:, 1)); That will have length equal to the number of unique values OT = [OT, accumarray(matA(:,1), mat...

accumarray works with made up data, but not real data

OT = unique(matA(:, 1)); That will have length equal to the number of unique values OT = [OT, accumarray(matA(:,1), mat...

1 hour ago | 0

| accepted

Answered

Unable to perform assignment because the size of the left side is 3-by-1 and the size of the right side is 4-by-1. X(:,1)=Xint is showing the error

you have an existing variable named X that is interfering with your code

Unable to perform assignment because the size of the left side is 3-by-1 and the size of the right side is 4-by-1. X(:,1)=Xint is showing the error

you have an existing variable named X that is interfering with your code

1 hour ago | 0

Answered

Calculating inverse of non square matrix

u1i = u1.'./ sqrt(sum(u1.^2)) could be said to be the inverse, in that u1 * u1i = 1 if I have worked things correctly and ...

Calculating inverse of non square matrix

u1i = u1.'./ sqrt(sum(u1.^2)) could be said to be the inverse, in that u1 * u1i = 1 if I have worked things correctly and ...

9 hours ago | 0

Answered

About the scatter plot.

a = a(:,[2:end,1]) ; and scatter(X(Y==1,1), X(Y==1,2), '*g') scatter(X(Y==0,1), X(Y==0,2), '*r')

About the scatter plot.

a = a(:,[2:end,1]) ; and scatter(X(Y==1,1), X(Y==1,2), '*g') scatter(X(Y==0,1), X(Y==0,2), '*r')

10 hours ago | 0

Answered

Calling different anonymous functions from a for loop

q_array = {@(x)ones(size(x)); @(x) abs(x); @(x) x.^2; @(x) (1/3)+(2/3)*x.^2} ; Now you can q_array{i}(nu(j)) Howeve...

Calling different anonymous functions from a for loop

q_array = {@(x)ones(size(x)); @(x) abs(x); @(x) x.^2; @(x) (1/3)+(2/3)*x.^2} ; Now you can q_array{i}(nu(j)) Howeve...

11 hours ago | 0

| accepted

Answered

Undefined variable "dsp" or class

You need to license and install DSP System Toolbox; https://www.mathworks.com/products/dsp-system.html

Undefined variable "dsp" or class

You need to license and install DSP System Toolbox; https://www.mathworks.com/products/dsp-system.html

12 hours ago | 0

Answered

Is it possible to install and run MATLAB R2020b on NVIDIA Xavier platform?

You are right, at present MATLAB is only supported on Intel platforms. Next month (December 2020), Mathworks intends to release...

Is it possible to install and run MATLAB R2020b on NVIDIA Xavier platform?

You are right, at present MATLAB is only supported on Intel platforms. Next month (December 2020), Mathworks intends to release...

12 hours ago | 0

Answered

Please compile the function file function a=test(b,c,d), so that when the input parameters are 1~3, the output parameter is the mean value of the input parameters (a=b or a=(b+c)/2 or a =(b+c+d)/3). Please directly use the source code of the functio

Your output variable is named mean. You need to assign to that variable.

Please compile the function file function a=test(b,c,d), so that when the input parameters are 1~3, the output parameter is the mean value of the input parameters (a=b or a=(b+c)/2 or a =(b+c+d)/3). Please directly use the source code of the functio

Your output variable is named mean. You need to assign to that variable.

16 hours ago | 0

Answered

Unable to perform assignment because the left and right sides have a different number of elements.

When you enter 7 then the code expects to read 7 lines with 8 values per line (though as the prompts hint you can put as many va...

Unable to perform assignment because the left and right sides have a different number of elements.

When you enter 7 then the code expects to read 7 lines with 8 values per line (though as the prompts hint you can put as many va...

16 hours ago | 0

Answered

Creating a symbolic array

a = sym([]); or better yet a = zeros(5,5,'sym')

Creating a symbolic array

a = sym([]); or better yet a = zeros(5,5,'sym')

17 hours ago | 0

| accepted

Answered

Need help in viewing a 2D image in 3D space.

volumeviewer perhaps. But I suspect idx = find(YourMatrix) ; [r, c, p] = ind2sub(size(YourMatrix), idx); scatter3(c, ...

Need help in viewing a 2D image in 3D space.

volumeviewer perhaps. But I suspect idx = find(YourMatrix) ; [r, c, p] = ind2sub(size(YourMatrix), idx); scatter3(c, ...

22 hours ago | 0

Answered

How to write if statement for logical value

any(Result{1,1}, 1)

How to write if statement for logical value

any(Result{1,1}, 1)

22 hours ago | 0

| accepted

Answered

GA does not solve problems with integer and equality constraints.

you can still use ga but you have to tell ga that you have no integer constraints. Then you have to provide a population functio...

GA does not solve problems with integer and equality constraints.

you can still use ga but you have to tell ga that you have no integer constraints. Then you have to provide a population functio...

22 hours ago | 1

Answered

Error using sym/subsindex () while using the symsum function

You can never use an unresolved symbolic variable as a subscript. You must always use definite numeric or logical values for ...

Error using sym/subsindex () while using the symsum function

You can never use an unresolved symbolic variable as a subscript. You must always use definite numeric or logical values for ...

22 hours ago | 0

| accepted

Answered

Error in Cumtrapz?

Remember after one integration you get a formula with a constant of integration, and when you integrate that, you get the double...

Error in Cumtrapz?

Remember after one integration you get a formula with a constant of integration, and when you integrate that, you get the double...

1 day ago | 0

Answered

How to remove duplicates from a matrix without using unique?

[~, a]=findgroups(d);

How to remove duplicates from a matrix without using unique?

[~, a]=findgroups(d);

2 days ago | 1

Answered

or() in categorical variable

ismember(financial_status, 1:2) At the moment I cannot think of any computer language that expresses a set membership test ...

or() in categorical variable

ismember(financial_status, 1:2) At the moment I cannot think of any computer language that expresses a set membership test ...

2 days ago | 0

Answered

can matlab calculate the area of irregular shape base on 2D-grid ?

No, in the general case the area of irregular shaped objects is not defined. See https://en.m.wikipedia.org/wiki/Koch_snowflake ...

can matlab calculate the area of irregular shape base on 2D-grid ?

No, in the general case the area of irregular shaped objects is not defined. See https://en.m.wikipedia.org/wiki/Koch_snowflake ...

3 days ago | 0

| accepted

Answered

Resizing the images to 100 x 100

TestData.Files(1:20) = cellfun(@(I) imresize(I,[100,100]), TestData.Files(1:20), 'uniform', 0); The code would have been sh...

Resizing the images to 100 x 100

TestData.Files(1:20) = cellfun(@(I) imresize(I,[100,100]), TestData.Files(1:20), 'uniform', 0); The code would have been sh...

3 days ago | 0

| accepted

Answered

GA Toolbox maximization fucntion

To maximize a function, minimize the negative of the function @(x) -f(x)

GA Toolbox maximization fucntion

To maximize a function, minimize the negative of the function @(x) -f(x)

4 days ago | 1

| accepted

Answered

можно ли сделать так, что бы сетка отображалась поверх 3D графиков?

fig = figure(); ax1 = axes('Parent', fig); [X, Y] = meshgrid(1:50, 1:60); Z = X.^2 + Y.^2 - cos(X.*Y); surf(ax1, X, Y, Z, ...

можно ли сделать так, что бы сетка отображалась поверх 3D графиков?

fig = figure(); ax1 = axes('Parent', fig); [X, Y] = meshgrid(1:50, 1:60); Z = X.^2 + Y.^2 - cos(X.*Y); surf(ax1, X, Y, Z, ...

4 days ago | 0

| accepted

Answered

how to compand the complex valued signal

https://www.mathworks.com/help/comm/ref/compand.html#fp1068641 Look in the Algorithms section, which gives the formulas. Thos...

how to compand the complex valued signal

https://www.mathworks.com/help/comm/ref/compand.html#fp1068641 Look in the Algorithms section, which gives the formulas. Thos...

4 days ago | 0

Answered

Plot of an equation of three unknown variables

http://www.mathworks.com/help/matlab/ref/slice.html http://www.mathworks.com/help/matlab/ref/isosurface.html For a full plot o...

Plot of an equation of three unknown variables

http://www.mathworks.com/help/matlab/ref/slice.html http://www.mathworks.com/help/matlab/ref/isosurface.html For a full plot o...

5 days ago | 0

Answered

what does this line do

The code goes through all of the F cell entries, and finds the number of columns in each, recording the number of columns in num...

what does this line do

The code goes through all of the F cell entries, and finds the number of columns in each, recording the number of columns in num...

5 days ago | 0

| accepted

Answered

Coding an equation (with summation within equation) with nested for Loops

You are probably summing T_xt(:,:,:) over the third dimension to get T(x,t) . However, when you do that, you would be adding T_...

Coding an equation (with summation within equation) with nested for Loops

You are probably summing T_xt(:,:,:) over the third dimension to get T(x,t) . However, when you do that, you would be adding T_...

5 days ago | 0

| accepted

Answered

Matlab solver for natural log equation

Q = @sym; %convert to rational syms x eqn = log(Q(0.5)) == (-Q(27109)/x)-Q(0.95)*log(x)+Q(25.18) S = solve(eqn,x) vpa(S) ...

Matlab solver for natural log equation

Q = @sym; %convert to rational syms x eqn = log(Q(0.5)) == (-Q(27109)/x)-Q(0.95)*log(x)+Q(25.18) S = solve(eqn,x) vpa(S) ...

5 days ago | 0

Answered

How to use parfor instead of for in this function

That is not possible. The output when i=2 depends on y(:,2) having been set properly, but y(:,) has not been assigned to until i...

How to use parfor instead of for in this function

That is not possible. The output when i=2 depends on y(:,2) having been set properly, but y(:,) has not been assigned to until i...

5 days ago | 0

| accepted