Answered

Infinite symsum returns symbolic number.

I do not know why that happens, but do this for a workaround: syms n x=0.5; y=1.5; f = (400/sinh(2*n*pi))*(((n*pi)*(1-(((-...

Infinite symsum returns symbolic number.

I do not know why that happens, but do this for a workaround: syms n x=0.5; y=1.5; f = (400/sinh(2*n*pi))*(((n*pi)*(1-(((-...

ongeveer 4 uur ago | 0

| accepted

Answered

Repeating a sequence of code multiple times in a for loop with random intervals in between

rec=@(x) (x)>=0.75; for counter = 1 : 150 j = (0 : 0.01 : 29); k = sin(j); f = rec(k); [a,b]=find(f~=0); ...

Repeating a sequence of code multiple times in a for loop with random intervals in between

rec=@(x) (x)>=0.75; for counter = 1 : 150 j = (0 : 0.01 : 29); k = sin(j); f = rec(k); [a,b]=find(f~=0); ...

ongeveer 5 uur ago | 0

Answered

Using matlab's spmd to compute simple triple integral is giving me incorrect solution, any thoughts on what I am doing wrong?

You integrate the first section of x with the first section of y and the first section of z, and the second section of x with th...

Using matlab's spmd to compute simple triple integral is giving me incorrect solution, any thoughts on what I am doing wrong?

You integrate the first section of x with the first section of y and the first section of z, and the second section of x with th...

ongeveer 5 uur ago | 0

Answered

Make a matrix with matching numbers per column from a bigger one

mask = A(:,1) == 2011 & A(:,5) == 101; B = A(mask,:);

Make a matrix with matching numbers per column from a bigger one

mask = A(:,1) == 2011 & A(:,5) == 101; B = A(mask,:);

ongeveer 5 uur ago | 1

| accepted

Answered

Generate a 100000x100000 matrix that takes less time and memory

a=zeros(ni,ni,'uint8'); You are already using only one byte per entry. If you were to create logic that packed 8 adjacent ent...

Generate a 100000x100000 matrix that takes less time and memory

a=zeros(ni,ni,'uint8'); You are already using only one byte per entry. If you were to create logic that packed 8 adjacent ent...

ongeveer 5 uur ago | 0

Answered

Start an external program (.exe) inside a matlab window

External processes always run as a separate window. However for non-graphic processes, you can control the standard output and s...

Start an external program (.exe) inside a matlab window

External processes always run as a separate window. However for non-graphic processes, you can control the standard output and s...

ongeveer 5 uur ago | 0

Answered

Imaginary Number Notation/ Formatting Real and Complex Results

An exact 0 imaginary part shows up as +0i if it is being displayed as part of a matrix of values in which some are not complex, ...

Imaginary Number Notation/ Formatting Real and Complex Results

An exact 0 imaginary part shows up as +0i if it is being displayed as part of a matrix of values in which some are not complex, ...

ongeveer 5 uur ago | 1

| accepted

Answered

how to put them text lines into loop to reduce the coding line?

text(repmat(1.688, 1, 8),[0.038, 0.028, 0.02, 0.13, 0.0076, 0.004, 0.0015, 0], {'ola', 'ola1', 'ola2', 'ol3', 'ol4', 'ola5', 'ol...

how to put them text lines into loop to reduce the coding line?

text(repmat(1.688, 1, 8),[0.038, 0.028, 0.02, 0.13, 0.0076, 0.004, 0.0015, 0], {'ola', 'ola1', 'ola2', 'ol3', 'ol4', 'ola5', 'ol...

ongeveer 17 uur ago | 1

| accepted

Answered

plot with equals in matlab

yy=sin(x)+0.2*sin(2x)-0.3*sin(3x); MATLAB has absolutely no implied multiplication anywhere. Not even in the symbolic toolbox. ...

plot with equals in matlab

yy=sin(x)+0.2*sin(2x)-0.3*sin(3x); MATLAB has absolutely no implied multiplication anywhere. Not even in the symbolic toolbox. ...

ongeveer 17 uur ago | 1

Answered

determine whether or not the following signals are periodic

plot(t,x) That should be plot(t,y) the second time. sol=mean(diff(locs)*0.1) why 0.1 ? Finding the average difference betwee...

determine whether or not the following signals are periodic

plot(t,x) That should be plot(t,y) the second time. sol=mean(diff(locs)*0.1) why 0.1 ? Finding the average difference betwee...

ongeveer 17 uur ago | 0

Answered

Adding edges to a Graph

Graph = addedge(Graph, TobeAdded(1:end-1), TobeAdded(2:end))

Adding edges to a Graph

Graph = addedge(Graph, TobeAdded(1:end-1), TobeAdded(2:end))

ongeveer 18 uur ago | 1

Answered

how can I write more than 1 objective in linprog line

You cannot have multiple objectives using linprog(), not even in the case where the constraints are the same for all objectives....

how can I write more than 1 objective in linprog line

You cannot have multiple objectives using linprog(), not even in the case where the constraints are the same for all objectives....

ongeveer 18 uur ago | 0

Answered

Lagrangian interpolation index exceeds matrix dimensions

>> fid = fopen('force.m','r'); n = fscanf(fid,'%f',1) n = [] >> type force.m F = [0.107 100;0.172 200;0.238 300;...

Lagrangian interpolation index exceeds matrix dimensions

>> fid = fopen('force.m','r'); n = fscanf(fid,'%f',1) n = [] >> type force.m F = [0.107 100;0.172 200;0.238 300;...

ongeveer 18 uur ago | 0

Answered

How to add offset to image?

clc; clearvars; close all; x=zeros(224,224); x(10:20,10:20)=randn(11,11); h=real(ifft2(x)); %h=real(ifft2(x))+5; "5" is for...

How to add offset to image?

clc; clearvars; close all; x=zeros(224,224); x(10:20,10:20)=randn(11,11); h=real(ifft2(x)); %h=real(ifft2(x))+5; "5" is for...

ongeveer 19 uur ago | 0

Answered

How to convert .slx model to .m or .p or . mlx or .mex?

You would need Simulink Coder, which would generate C or C++ code that you would call from Python.

How to convert .slx model to .m or .p or . mlx or .mex?

You would need Simulink Coder, which would generate C or C++ code that you would call from Python.

ongeveer 20 uur ago | 0

Answered

Need Help with surface plot. Getting error that dimensions of S do not match

clear all clc close all tspan=logspace(-10,6,(16*10)+1) y0=[1;0;0]% IC of Concentration Ea1=linspace(10,15); Ea2=lin...

Need Help with surface plot. Getting error that dimensions of S do not match

clear all clc close all tspan=logspace(-10,6,(16*10)+1) y0=[1;0;0]% IC of Concentration Ea1=linspace(10,15); Ea2=lin...

ongeveer 24 uur ago | 0

Answered

Writing data in columns from "for loop" to ".txt" file

The only way to write column-by-column to a text file is to arrange the code so that at each step, it reads the existing content...

Writing data in columns from "for loop" to ".txt" file

The only way to write column-by-column to a text file is to arrange the code so that at each step, it reads the existing content...

ongeveer 24 uur ago | 1

| accepted

Answered

Assign multiple elements of one cell array to another

B(:,:,2) = A;

Assign multiple elements of one cell array to another

B(:,:,2) = A;

1 dag ago | 0

| accepted

Answered

Please explain the training set for neural network

how to get numdate ? In the example there "Electricity Load Forecasting using Neural Networks" then you have to look at the fir...

Please explain the training set for neural network

how to get numdate ? In the example there "Electricity Load Forecasting using Neural Networks" then you have to look at the fir...

1 dag ago | 0

| accepted

Answered

Getting error: Second argument must be a variable or a nonnegative integer specifying the number of differentiations.

It is not possible to differentiate with respect to a function. You have to make a substitution and hope that the system remain...

Getting error: Second argument must be a variable or a nonnegative integer specifying the number of differentiations.

It is not possible to differentiate with respect to a function. You have to make a substitution and hope that the system remain...

1 dag ago | 1

| accepted

Answered

How do I plot an Inverse Laplace? (symbolic to vectorized equations)

As is not uncommon, the inverse laplace of that particular function is defined in terms of a quantity evaluated over the sum of ...

How do I plot an Inverse Laplace? (symbolic to vectorized equations)

As is not uncommon, the inverse laplace of that particular function is defined in terms of a quantity evaluated over the sum of ...

1 dag ago | 1

| accepted

Answered

column operator erases complex property

For reasons I do not understand, z(:) is being treated as an expression. If you make z larger but complex, then reshape(z,[],1) ...

column operator erases complex property

For reasons I do not understand, z(:) is being treated as an expression. If you make z larger but complex, then reshape(z,[],1) ...

1 dag ago | 0

| accepted

Answered

solving ode45 with mutliple classes

You are trying to return a cell from your odefun. ode45 requires that you return a numeric column vector with the same number of...

solving ode45 with mutliple classes

You are trying to return a cell from your odefun. ode45 requires that you return a numeric column vector with the same number of...

1 dag ago | 0

Answered

How to display vector elements in a structure field?

MATLAB does not give any control over the number of elements displayed by @struct/display Some similar matlab routines choose...

How to display vector elements in a structure field?

MATLAB does not give any control over the number of elements displayed by @struct/display Some similar matlab routines choose...

1 dag ago | 1

| accepted

Answered

draw a plot-graph

If F(n) is not a constant, then you have the problem that you have three independent variables and one dependent variable. That ...

draw a plot-graph

If F(n) is not a constant, then you have the problem that you have three independent variables and one dependent variable. That ...

1 dag ago | 1

Answered

Error using eig. Input matrix contains NaN or Inf.

Revised code1.m. Please re-check whether the data is indeed lat/lon or is cartographic (km) datavariety = 1; %1: data is lat/l...

Error using eig. Input matrix contains NaN or Inf.

Revised code1.m. Please re-check whether the data is indeed lat/lon or is cartographic (km) datavariety = 1; %1: data is lat/l...

1 dag ago | 1

| accepted

Answered

Plot not looking like equation should.

point (0,y) should be joined to point (C-y, 0) for some constant C eg 0 1 to 5 0, 0 2 to 4 0, 0 3 to 3 0, 0 4 to 2 0, 0 5 to ...

Plot not looking like equation should.

point (0,y) should be joined to point (C-y, 0) for some constant C eg 0 1 to 5 0, 0 2 to 4 0, 0 3 to 3 0, 0 4 to 2 0, 0 5 to ...

2 dagen ago | 0

Answered

Multiple Iterations over a system of linear equations

u(1:1:N) = 0; u(N+1) = 1; So all of your u values are 0 except for the last one k(j) = ((1-G(t))*u(j))+((G(t)/2)*(u(j+1)+u(j-...

Multiple Iterations over a system of linear equations

u(1:1:N) = 0; u(N+1) = 1; So all of your u values are 0 except for the last one k(j) = ((1-G(t))*u(j))+((G(t)/2)*(u(j+1)+u(j-...

2 dagen ago | 0

| accepted

Answered

Dot indexing is not supported for variables of this type when trying to write value into static text box

function text7_CreateFcn(hObject, eventdata, handles) value = 1; set(hObject, 'String', num2str(value))

Dot indexing is not supported for variables of this type when trying to write value into static text box

function text7_CreateFcn(hObject, eventdata, handles) value = 1; set(hObject, 'String', num2str(value))

3 dagen ago | 0