Answered

Undefined function 'x' for input arguments of type 'double'. Why does this flag that particular line and nowhere else? Is there a was to fix it?

y=z(:,1); y=z(:,3); should be x=z(:,1); y=z(:,3);

Undefined function 'x' for input arguments of type 'double'. Why does this flag that particular line and nowhere else? Is there a was to fix it?

y=z(:,1); y=z(:,3); should be x=z(:,1); y=z(:,3);

5 días ago | 0

Answered

How do you produce an empty plot if value is higher or lower than given user input value?

y=nan; custom=nan; If you want to produce an empty plot for that case. Your current code will not prod...

How do you produce an empty plot if value is higher or lower than given user input value?

y=nan; custom=nan; If you want to produce an empty plot for that case. Your current code will not prod...

5 días ago | 0

Answered

Have function use variables within workspace

Normal functions cannot see the variables in the workspace of the caller -- not unless the function specifically asks to look th...

Have function use variables within workspace

Normal functions cannot see the variables in the workspace of the caller -- not unless the function specifically asks to look th...

5 días ago | 1

Answered

Need help with inverse laplace

syms s tp T assume(T>=0) %THIS X_a=((1/s)-(1/(s+(1/tp))))*exp(-T*s) x_a=ilaplace(X_a)

Need help with inverse laplace

syms s tp T assume(T>=0) %THIS X_a=((1/s)-(1/(s+(1/tp))))*exp(-T*s) x_a=ilaplace(X_a)

5 días ago | 0

Answered

My while loop and rem function create an infinite loop

You do give a chance for the user to enter x again, so you are testing the same x each time.

My while loop and rem function create an infinite loop

You do give a chance for the user to enter x again, so you are testing the same x each time.

5 días ago | 0

| accepted

Answered

Draw multiple surfaces from different tables(.mat) files. Such that the different .mat files have different Color and names should be displayed on the surface

I already gave you instructions on how to do this, but you did not follow the instructions. Also, you did not deal with the fac...

Draw multiple surfaces from different tables(.mat) files. Such that the different .mat files have different Color and names should be displayed on the surface

I already gave you instructions on how to do this, but you did not follow the instructions. Also, you did not deal with the fac...

5 días ago | 1

Answered

± use in MATLAB

syms ALPHA syms delta_1 delta_2 assume(-0.008 <= delta_1 & delta_1 <= 0.008) assume(-0.002 <= delta_2 & delta_2 <= 0.002) CL...

± use in MATLAB

syms ALPHA syms delta_1 delta_2 assume(-0.008 <= delta_1 & delta_1 <= 0.008) assume(-0.002 <= delta_2 & delta_2 <= 0.002) CL...

5 días ago | 0

Answered

Am I Going About This the Right Way?

No. You need to find the location x, y such that the total of (0.5*distance*volume) over each of the customers, is minimized. ...

Am I Going About This the Right Way?

No. You need to find the location x, y such that the total of (0.5*distance*volume) over each of the customers, is minimized. ...

5 días ago | 1

Answered

Solve non-linear equations system parametrically, Why are the answers empty?

There are four solution sets, that look something like [X1 == 1, X2 == (cos(Lz1*h*sin(RootOf(Lz1^2*cos(Z)^2*h^2+cos(Z)^2*Z^2*k...

Solve non-linear equations system parametrically, Why are the answers empty?

There are four solution sets, that look something like [X1 == 1, X2 == (cos(Lz1*h*sin(RootOf(Lz1^2*cos(Z)^2*h^2+cos(Z)^2*Z^2*k...

5 días ago | 0

Answered

The limit of a symbolic expression

The limit of constant 0 times f(x) is 0 unless f(x) approaches infinity at the same rate that the constant 0 approaches being 0....

The limit of a symbolic expression

The limit of constant 0 times f(x) is 0 unless f(x) approaches infinity at the same rate that the constant 0 approaches being 0....

5 días ago | 0

Answered

spline interpolation error , index in line 1

spline = spline(t,e_t); After that line spline refers to an array not the function. Use a different variable name.

spline interpolation error , index in line 1

spline = spline(t,e_t); After that line spline refers to an array not the function. Use a different variable name.

5 días ago | 0

| accepted

Answered

Is there a way to get an 8 x 1 matrix instead of 8 x 3 using dec2bin or any other?

string(dec2bin (2 ^ n-1: -1: 0)) This will be considered an array. The entries will be string objects such as "011". The en...

Is there a way to get an 8 x 1 matrix instead of 8 x 3 using dec2bin or any other?

string(dec2bin (2 ^ n-1: -1: 0)) This will be considered an array. The entries will be string objects such as "011". The en...

5 días ago | 2

| accepted

Answered

using symbolic variable with spline interpolations

[~, coeffs] = unmkpp(pp); Splines are not a single equation in the sense of a single polynomial that works from beginning t...

using symbolic variable with spline interpolations

[~, coeffs] = unmkpp(pp); Splines are not a single equation in the sense of a single polynomial that works from beginning t...

5 días ago | 0

Answered

matlab function in simulink

You are in a MATLAB Function Block, so you need to follow MATLAB syntax. MATLAB does not have multiple assignment in the form...

matlab function in simulink

You are in a MATLAB Function Block, so you need to follow MATLAB syntax. MATLAB does not have multiple assignment in the form...

5 días ago | 0

Answered

Error using PARFOR: Index exceeds the number of array elements

global variables are not copied to workers when you use Parallel Computing Toolbox, and setting the variable on one worker does ...

Error using PARFOR: Index exceeds the number of array elements

global variables are not copied to workers when you use Parallel Computing Toolbox, and setting the variable on one worker does ...

5 días ago | 0

| accepted

Answered

How can we solve this, how to convert mupad to live script?

A = [[2, 1, 1] [3, 4, 3] [3, 5, 4] [2, 6, 5]]; surf(A)

How can we solve this, how to convert mupad to live script?

A = [[2, 1, 1] [3, 4, 3] [3, 5, 4] [2, 6, 5]]; surf(A)

6 días ago | 0

Answered

Invalid expression. Need help fixing my function.

if score < 0 || score > 100

Invalid expression. Need help fixing my function.

if score < 0 || score > 100

6 días ago | 0

| accepted

Answered

Linear programming code not showing the solution

Where do you assign something nonempty to vert? Why do you calculate y since you never use it?

Linear programming code not showing the solution

Where do you assign something nonempty to vert? Why do you calculate y since you never use it?

6 días ago | 0

Answered

Solve system of equations with the symbolic matrix

T = sym('x', [4 4]); T(4,:) = [0 0 0 1]; T p_new1 = [2 0 0 1].'; p_old1 = [0 0 0 1].'; p_new2 = [3 0 0 1].'; p_old2 = ...

Solve system of equations with the symbolic matrix

T = sym('x', [4 4]); T(4,:) = [0 0 0 1]; T p_new1 = [2 0 0 1].'; p_old1 = [0 0 0 1].'; p_new2 = [3 0 0 1].'; p_old2 = ...

6 días ago | 0

| accepted

Answered

Logical with complex numbers in a vector

e = [-1e-9;3;9;0] t = sqrt(e); [real(t), imag(t)] t == 0 format long g e [real(t), imag(t)] You are being mislead by your...

Logical with complex numbers in a vector

e = [-1e-9;3;9;0] t = sqrt(e); [real(t), imag(t)] t == 0 format long g e [real(t), imag(t)] You are being mislead by your...

6 días ago | 0

| accepted

Answered

Not Sure How to Call a Norm from Within a Function

N = sqrt(sum(y(:,4:7).^2,2)); plot(t, N)

Not Sure How to Call a Norm from Within a Function

N = sqrt(sum(y(:,4:7).^2,2)); plot(t, N)

6 días ago | 1

| accepted

Answered

How to show the image slice from the below example?

% This is a part of the code % Visualize the CT and SPECT together for m = 1:199 CT_img = new_CT(:,...

How to show the image slice from the below example?

% This is a part of the code % Visualize the CT and SPECT together for m = 1:199 CT_img = new_CT(:,...

6 días ago | 0

| accepted

Answered

The variable ... appears to change size on every loop iteration. Consider preallocating.

word2 = char(zeros(1,L));

The variable ... appears to change size on every loop iteration. Consider preallocating.

word2 = char(zeros(1,L));

6 días ago | 0

| accepted

Answered

Solve symbolic equation system

That is a series of ODE. You will not be able to solve it with solve(). You could try it with dsolve([eqn1, eqn2, eqn3, eqn4]) ...

Solve symbolic equation system

That is a series of ODE. You will not be able to solve it with solve(). You could try it with dsolve([eqn1, eqn2, eqn3, eqn4]) ...

6 días ago | 0

| accepted

Answered

How can I re write this but with a different variable other than "syms"

% average of las 4 digitss avg=4; % get gama value gama=5+avg; % 5% relative error err=5/100; % defining the functio...

How can I re write this but with a different variable other than "syms"

% average of las 4 digitss avg=4; % get gama value gama=5+avg; % 5% relative error err=5/100; % defining the functio...

6 días ago | 0

Answered

Combine and average several *.mat files

matdir = 'name_of_directory'; %could be '.' outfile = 'path/to/output.mat'; dinfo = dir(fullfile(matdir, '*.mat')); filename...

Combine and average several *.mat files

matdir = 'name_of_directory'; %could be '.' outfile = 'path/to/output.mat'; dinfo = dir(fullfile(matdir, '*.mat')); filename...

6 días ago | 1

| accepted

Answered

count number of rows in csv outside of matlab

csvdir = 'appropriate_directory_name'; %use '.' for current directory csvFiles = dir(fullfile(csvdir, '*.csv')); filenames = ...

count number of rows in csv outside of matlab

csvdir = 'appropriate_directory_name'; %use '.' for current directory csvFiles = dir(fullfile(csvdir, '*.csv')); filenames = ...

6 días ago | 0

Answered

how to draw 3d histogram of an image ad shown in figure

Histogram implies that you are binning the data, and the coordinates are associated with the edge or central value of the bin. 3...

how to draw 3d histogram of an image ad shown in figure

Histogram implies that you are binning the data, and the coordinates are associated with the edge or central value of the bin. 3...

6 días ago | 0

| accepted

Answered

Why am I getting this error when trying to show a cell of an array? "Brace indexing is not supported for variables of this type"

Your file has no data (after at most 3 header lines). The textscan result is empty.

Why am I getting this error when trying to show a cell of an array? "Brace indexing is not supported for variables of this type"

Your file has no data (after at most 3 header lines). The textscan result is empty.

6 días ago | 0