Answered

Loop structure for fixed point.

and the correct answer when I calculated manually is 2.7424 No it is not. The correct answer is 2.71934053986603 format long ...

Loop structure for fixed point.

and the correct answer when I calculated manually is 2.7424 No it is not. The correct answer is 2.71934053986603 format long ...

37 minuter ago | 0

Answered

fimplicit increasing number of points

fp = fimplicit(@(x,y) x.^2 + 2*y.^2 - 1); %Example Points1 = [fp.XData;fp.YData]; axis equal title('mesh default = 151') f...

fimplicit increasing number of points

fp = fimplicit(@(x,y) x.^2 + 2*y.^2 - 1); %Example Points1 = [fp.XData;fp.YData]; axis equal title('mesh default = 151') f...

ungefär en timme ago | 0

| accepted

Answered

Error: Invalid expression log equation

syms t a eqns =-a*log((3*t/4)*(3-t^2)/(2-t))-(1-a)*log((1/t^2)*((3-2*t)/(2-t)))+a*((1-t)^2)*(3-t)/((2-t)*(3-t^2)-(1-a)*(1+t)...

Error: Invalid expression log equation

syms t a eqns =-a*log((3*t/4)*(3-t^2)/(2-t))-(1-a)*log((1/t^2)*((3-2*t)/(2-t)))+a*((1-t)^2)*(3-t)/((2-t)*(3-t^2)-(1-a)*(1+t)...

ungefär en timme ago | 0

Answered

courbe de suivie des pixels dans les images

for n=1:25 k=dicomread(fullfile(rep, list(n).name)); end; Why do you read all of them but immediately throw all of them away ...

courbe de suivie des pixels dans les images

for n=1:25 k=dicomread(fullfile(rep, list(n).name)); end; Why do you read all of them but immediately throw all of them away ...

ungefär 2 timmar ago | 0

Answered

Need Help with GUI errors

"clear all" is not appropriate inside any program and can cause odd problems. You should be opening the arduino in the OpenF...

Need Help with GUI errors

"clear all" is not appropriate inside any program and can cause odd problems. You should be opening the arduino in the OpenF...

ungefär 5 timmar ago | 0

Answered

Why do I keep obtaining complex matrices if I have only real values?

When you use root() or solve() of a degree 4 polynomial, some of the terms of the computation inherently involve imaginary compo...

Why do I keep obtaining complex matrices if I have only real values?

When you use root() or solve() of a degree 4 polynomial, some of the terms of the computation inherently involve imaginary compo...

ungefär 8 timmar ago | 0

Answered

~isequal and ~= not working

if ~isequal(transpose(ValueOfd), m) disp("A is not diagonalizable") else disp("A is diagonalizable") end

~isequal and ~= not working

if ~isequal(transpose(ValueOfd), m) disp("A is not diagonalizable") else disp("A is diagonalizable") end

ungefär 9 timmar ago | 0

Answered

custom axis at the imshow

Your tick marks are not linear in x or in y. On my monitor, the distance between the first -15 and 0 is close to 1 cm more than ...

custom axis at the imshow

Your tick marks are not linear in x or in y. On my monitor, the distance between the first -15 and 0 is close to 1 cm more than ...

ungefär 13 timmar ago | 0

Answered

Need help with a for loop implementation for the below code

map(:,:,itrial) = sparse(ceil(eye.y(~blink)/binsz)+y0,ceil(eye.x(~blink)/binsz)+x0,1,sz(1),sz(2)); The right hand side appears ...

Need help with a for loop implementation for the below code

map(:,:,itrial) = sparse(ceil(eye.y(~blink)/binsz)+y0,ceil(eye.x(~blink)/binsz)+x0,1,sz(1),sz(2)); The right hand side appears ...

ungefär 14 timmar ago | 0

Answered

Need help with Reed-Solomon Coding

n = 255; img = imread('pout.tif'); binary = img > 102; resized = imresize(binary,[291 247]); [row k] = size(resized); g...

Need help with Reed-Solomon Coding

n = 255; img = imread('pout.tif'); binary = img > 102; resized = imresize(binary,[291 247]); [row k] = size(resized); g...

ungefär 23 timmar ago | 0

| accepted

Answered

Check for missing argument or incorrect argument data type in call to function 'sinc'.

The code works for me. You might have a sinc.m of your own that is interfering. Check which -all sinc You might see /Applicat...

Check for missing argument or incorrect argument data type in call to function 'sinc'.

The code works for me. You might have a sinc.m of your own that is interfering. Check which -all sinc You might see /Applicat...

ungefär 23 timmar ago | 0

Answered

How to use "ga" (genetic algorithm) for curve fitting

cost_wrapper = @(x) Cost(x(1),x(2),x(3),x(4),x(5),x(6)); coef = ga(cost_wrapper, 6)

How to use "ga" (genetic algorithm) for curve fitting

cost_wrapper = @(x) Cost(x(1),x(2),x(3),x(4),x(5),x(6)); coef = ga(cost_wrapper, 6)

ungefär 23 timmar ago | 0

| accepted

Answered

Please help! Am trying to find c(n)

k is a symbolic variable. You can never use a symbolic variable as part of an index, the way you do in c(n-k) You are confusin...

Please help! Am trying to find c(n)

k is a symbolic variable. You can never use a symbolic variable as part of an index, the way you do in c(n-k) You are confusin...

en dag ago | 0

Answered

Plotting a logical function if a value is greater than 0

torvals = linspace(0,6); ntor = length(torvals); C = categorical(nan(ntor,1), (1:6),{'AB', 'BC', 'CA', 'AG', 'BG', 'CG'}, 'o...

Plotting a logical function if a value is greater than 0

torvals = linspace(0,6); ntor = length(torvals); C = categorical(nan(ntor,1), (1:6),{'AB', 'BC', 'CA', 'AG', 'BG', 'CG'}, 'o...

en dag ago | 0

Answered

Tic-tac-toe winner check

xmask = TTCboard == 1; if all(xmask,1) || all(xmask,2) || all(diag(xmask)) || TEST_FOR_THE_OTHER_DIAGONAL x wins end

Tic-tac-toe winner check

xmask = TTCboard == 1; if all(xmask,1) || all(xmask,2) || all(diag(xmask)) || TEST_FOR_THE_OTHER_DIAGONAL x wins end

en dag ago | 0

| accepted

Answered

help request in EEMD (Ensemble Empirical Mode Decomposition)

The eemd function you supply can only return modes, but your sample code asks for residual as well, so you must not be using tha...

help request in EEMD (Ensemble Empirical Mode Decomposition)

The eemd function you supply can only return modes, but your sample code asks for residual as well, so you must not be using tha...

en dag ago | 0

| accepted

Answered

How to call a .txt file containing dates in format "01-JAN-2019" and time against three other independent variables to MATLAB?

filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/584765/data.txt'; t = readtable(filename, 'Format'...

How to call a .txt file containing dates in format "01-JAN-2019" and time against three other independent variables to MATLAB?

filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/584765/data.txt'; t = readtable(filename, 'Format'...

en dag ago | 1

| accepted

Answered

How to find values for corresponding elements

wanted_output = nan(length(time_vector),1); mask = islocalmax(Q); wanted_output(mask) = Q(mask);

How to find values for corresponding elements

wanted_output = nan(length(time_vector),1); mask = islocalmax(Q); wanted_output(mask) = Q(mask);

en dag ago | 1

| accepted

Answered

How to open Matlab with specific scripts in my editor?

See https://www.mathworks.com/matlabcentral/answers/344124-restore-open-files-in-editor-from-previous-sessions https://www.mat...

How to open Matlab with specific scripts in my editor?

See https://www.mathworks.com/matlabcentral/answers/344124-restore-open-files-in-editor-from-previous-sessions https://www.mat...

en dag ago | 0

Answered

How to use solve with a equation with limit

syms b1 c1 s a = 1; b = 7.598; c = 6.784; kp = limit(20.185/(a*s^2+b*b1*s+c),s,0) Notice this is constant, not dependent on...

How to use solve with a equation with limit

syms b1 c1 s a = 1; b = 7.598; c = 6.784; kp = limit(20.185/(a*s^2+b*b1*s+c),s,0) Notice this is constant, not dependent on...

en dag ago | 0

| accepted

Answered

How to close graph help popup from command line?

Perhaps https://www.mathworks.com/help/matlab/ref/disabledefaultinteractivity.html See also https://www.mathworks.com/help/mat...

How to close graph help popup from command line?

Perhaps https://www.mathworks.com/help/matlab/ref/disabledefaultinteractivity.html See also https://www.mathworks.com/help/mat...

en dag ago | 0

Answered

Finding a variable between a a lot of m files

In the main MATLAB command window, look on the HOME tab, in the ribbon, 5th entry is "Find files". Click on there and you will b...

Finding a variable between a a lot of m files

In the main MATLAB command window, look on the HOME tab, in the ribbon, 5th entry is "Find files". Click on there and you will b...

2 dagar ago | 0

| accepted

Answered

matlabFunction: Index exceeds the number of array elements for Matlab R2021a

matlabFunction has a bug in writing any function using piecewise to a file in expression that is complicated enough that the fun...

matlabFunction: Index exceeds the number of array elements for Matlab R2021a

matlabFunction has a bug in writing any function using piecewise to a file in expression that is complicated enough that the fun...

2 dagar ago | 0

| accepted

Answered

How to define a binary decision variable as upper and lower bond in an optimization function?

https://www.mathworks.com/help/gads/particle-swarm-optimization-algorithm.html You cannot use integer constraints with the Mat...

How to define a binary decision variable as upper and lower bond in an optimization function?

https://www.mathworks.com/help/gads/particle-swarm-optimization-algorithm.html You cannot use integer constraints with the Mat...

2 dagar ago | 1

Answered

Problem with matlabFunction throwing error in latest MATLAB version

There is a bug in matlabFunction in R2021a, in a section of code that did not exist at all before (and had no analog at all befo...

Problem with matlabFunction throwing error in latest MATLAB version

There is a bug in matlabFunction in R2021a, in a section of code that did not exist at all before (and had no analog at all befo...

2 dagar ago | 0

| accepted

Answered

MATLAB write a function that generates n x n matrix WITHOUT built in functions.

Your S is symmetric. However, your code uses the undefined variable A B = A' + A; B(1:n+1:end)=diag(A); %This part is suppos...

MATLAB write a function that generates n x n matrix WITHOUT built in functions.

Your S is symmetric. However, your code uses the undefined variable A B = A' + A; B(1:n+1:end)=diag(A); %This part is suppos...

2 dagar ago | 1

Answered

fprintf returns blank square for value of 1?

You are trying to use a %s (string) format to display floating point data. Use a %f or %g format instead. DRAT = [72 105] fpri...

fprintf returns blank square for value of 1?

You are trying to use a %s (string) format to display floating point data. Use a %f or %g format instead. DRAT = [72 105] fpri...

3 dagar ago | 0

| accepted

Answered

how to make nxn matrix

n = 7 d = ones(1,n-2)/2; M = zeros(n,n) + diag([0,d],+1) + diag([d,0],-1); M(1) = 1; M(end) = 1; M

how to make nxn matrix

n = 7 d = ones(1,n-2)/2; M = zeros(n,n) + diag([0,d],+1) + diag([d,0],-1); M(1) = 1; M(end) = 1; M

3 dagar ago | 1

| accepted

Answered

Need to find the smallest [n] such that the sum for a harmonic series is greater than some value X.

n = 25000; %max number of rows that will print S = 0; %initial starting value of sum for i...

Need to find the smallest [n] such that the sum for a harmonic series is greater than some value X.

n = 25000; %max number of rows that will print S = 0; %initial starting value of sum for i...

3 dagar ago | 1

| accepted