Answered

Galois field to binary matrix conversion (BCH encoding)

NC = noisycode.x; That will be uint32 with min 0 and max 0, so you can logical() it or double() it or uint8() it as appropriate...

Galois field to binary matrix conversion (BCH encoding)

NC = noisycode.x; That will be uint32 with min 0 and max 0, so you can logical() it or double() it or uint8() it as appropriate...

alrededor de 3 horas ago | 0

Answered

How to add constraints to simulannealbnd minimization

You cannot add constraints directly. However you can set AnnealingFcn to the handle of a function that only generates points tha...

How to add constraints to simulannealbnd minimization

You cannot add constraints directly. However you can set AnnealingFcn to the handle of a function that only generates points tha...

alrededor de 3 horas ago | 1

Answered

Plotting a non linear equation.

format long g t_min = .3, t_max = .8 syms theta_opt m real a = sin(theta_opt).^2; b = (cos(theta_opt) - sin(theta_opt)...

Plotting a non linear equation.

format long g t_min = .3, t_max = .8 syms theta_opt m real a = sin(theta_opt).^2; b = (cos(theta_opt) - sin(theta_opt)...

alrededor de 4 horas ago | 1

| accepted

Answered

Input #2 expected to be a cell array, was struct instead.

You need arrayfun() instead of cellfun() for that purpose. This assumes that in time Code2Model will be a non-scalar struct ar...

Input #2 expected to be a cell array, was struct instead.

You need arrayfun() instead of cellfun() for that purpose. This assumes that in time Code2Model will be a non-scalar struct ar...

alrededor de 4 horas ago | 0

Answered

How to get all possible combinations of three independent data sets?

A = [A_x A_y]; B = [B_x B_y]; C = [C_x C_y]; ABC = [A;B;C]; D= [D_x D_y]; E = [E_x E_y]; F = [F_x F_y]; DEF = [D;E;F]...

How to get all possible combinations of three independent data sets?

A = [A_x A_y]; B = [B_x B_y]; C = [C_x C_y]; ABC = [A;B;C]; D= [D_x D_y]; E = [E_x E_y]; F = [F_x F_y]; DEF = [D;E;F]...

alrededor de 4 horas ago | 2

| accepted

Answered

guesses of parameters in fmincon do not satisfy the constraints in nonlcon

Solvers can violate bounds constraints with some options: https://www.mathworks.com/help/optim/ug/iterations-can-violate-constr...

guesses of parameters in fmincon do not satisfy the constraints in nonlcon

Solvers can violate bounds constraints with some options: https://www.mathworks.com/help/optim/ug/iterations-can-violate-constr...

alrededor de 4 horas ago | 0

Answered

Find the index range of ones/trues?

test_vector = [0,0,1,0,0,1,1,0,1,1,1,0,1,1,1,1]; starts = strfind([0 test_vector], [0 1]); stops = strfind([test_vector 0], [1...

Find the index range of ones/trues?

test_vector = [0,0,1,0,0,1,1,0,1,1,1,0,1,1,1,1]; starts = strfind([0 test_vector], [0 1]); stops = strfind([test_vector 0], [1...

alrededor de 4 horas ago | 0

Answered

Improving speed of readtable

Where all of the time is spent on the TreatAsEmpty command (because of having many zero entries?) No, that is not what is happe...

Improving speed of readtable

Where all of the time is spent on the TreatAsEmpty command (because of having many zero entries?) No, that is not what is happe...

alrededor de 5 horas ago | 0

| accepted

Answered

Device number can that used with one license

Home and Student licenses: one device only (Individual) Academic licenses: two devices activated (Individual) Standard (Commer...

Device number can that used with one license

Home and Student licenses: one device only (Individual) Academic licenses: two devices activated (Individual) Standard (Commer...

alrededor de 8 horas ago | 0

Answered

Fzero function error in matlab

x = fzero(@(x) (707.34/(x-x^2)*(1+0.1*(10.589*(1-x)/x).^0.75)-(x-x^2)*9778.608 , 0.2) 1 2 1 2 3 2 3 4 ...

Fzero function error in matlab

x = fzero(@(x) (707.34/(x-x^2)*(1+0.1*(10.589*(1-x)/x).^0.75)-(x-x^2)*9778.608 , 0.2) 1 2 1 2 3 2 3 4 ...

1 día ago | 0

Answered

How do I find unknown parameter from an equation?

eqn = @(c) z - a.*b./(c.*d); c = fsolve(eqn, GUESS) This assumes that the equation is complex enough that you cannot just me...

How do I find unknown parameter from an equation?

eqn = @(c) z - a.*b./(c.*d); c = fsolve(eqn, GUESS) This assumes that the equation is complex enough that you cannot just me...

1 día ago | 0

| accepted

Answered

Issues with audiorecorder function in Matlab online R2020a?

As mentioned by @Eddy Armas At least up to R2021a, MATLAB Online does not support audio input. MATLAB Online does support som...

Issues with audiorecorder function in Matlab online R2020a?

As mentioned by @Eddy Armas At least up to R2021a, MATLAB Online does not support audio input. MATLAB Online does support som...

1 día ago | 0

Answered

When combining multiple photos, I want to have one matrix that shows only the highest value at each pixel's place.

Start with the first image, and copy it to the proposed output. For each additional image, figure out how it overlaps the curre...

When combining multiple photos, I want to have one matrix that shows only the highest value at each pixel's place.

Start with the first image, and copy it to the proposed output. For each additional image, figure out how it overlaps the curre...

1 día ago | 0

Answered

How to increase matlabFunction length limit

matlabFunction(C, 'vars', {q, qdot, alpha, l, rho}, 'file', strcat(dpath,'/C_fun'), 'Optimize', true); Index exceeds the number...

How to increase matlabFunction length limit

matlabFunction(C, 'vars', {q, qdot, alpha, l, rho}, 'file', strcat(dpath,'/C_fun'), 'Optimize', true); Index exceeds the number...

1 día ago | 0

Answered

How to make multiple execution of a code by loop ?

Replace x=array2table(x) y=array2table(y) TABLE=[A B x y]; TABLE.Properties.VariableNames(1:4) = {'A','B','x','y'}; with ...

How to make multiple execution of a code by loop ?

Replace x=array2table(x) y=array2table(y) TABLE=[A B x y]; TABLE.Properties.VariableNames(1:4) = {'A','B','x','y'}; with ...

1 día ago | 0

Answered

How can I covert serious of grey scale images to jet images

in_ext = '.png'; out_ext = '.png'; projectdir = 'path/to/files'; %can be '.' outdir = 'path/to/store/output'; %must be dif...

How can I covert serious of grey scale images to jet images

in_ext = '.png'; out_ext = '.png'; projectdir = 'path/to/files'; %can be '.' outdir = 'path/to/store/output'; %must be dif...

1 día ago | 0

Answered

how to speed up code

If I read the code correctly, then numused = sum(track_length_DNS); mycell_tracks_index = mat2cell(index_tracks_matching(1:num...

how to speed up code

If I read the code correctly, then numused = sum(track_length_DNS); mycell_tracks_index = mat2cell(index_tracks_matching(1:num...

1 día ago | 0

| accepted

Answered

Reading a .dt2 file in MATLAB

https://www.mathworks.com/matlabcentral/fileexchange/25897-read-dted-elevation-data looks like it should support .dt2 files.

Reading a .dt2 file in MATLAB

https://www.mathworks.com/matlabcentral/fileexchange/25897-read-dted-elevation-data looks like it should support .dt2 files.

1 día ago | 0

Answered

Can you use matlab code within an Arduino sketch?

MATLAB code cannot be included in an arduino sketch. With current releases, you can target MATLAB code to be deployed to Raspb...

Can you use matlab code within an Arduino sketch?

MATLAB code cannot be included in an arduino sketch. With current releases, you can target MATLAB code to be deployed to Raspb...

1 día ago | 0

Answered

FSOLVE requires all values returned by functions to be of data type double.

syms a b c d e X=input('numb of carbon atoms in fuel'); Y=input('numb of hidrogen atoms in fuel'); Z=input('fuel to air ratio...

FSOLVE requires all values returned by functions to be of data type double.

syms a b c d e X=input('numb of carbon atoms in fuel'); Y=input('numb of hidrogen atoms in fuel'); Z=input('fuel to air ratio...

1 día ago | 0

Answered

How to break a while loop to another one?

while outer test outer stuff quit_middle = false; while middle test middle stuff while inner test i...

How to break a while loop to another one?

while outer test outer stuff quit_middle = false; while middle test middle stuff while inner test i...

1 día ago | 0

Answered

Exporting the output into a .txt file

You could evalc() the code, getting back a character vector, that you then wrote to a file. You could fopen() a file, and fpri...

Exporting the output into a .txt file

You could evalc() the code, getting back a character vector, that you then wrote to a file. You could fopen() a file, and fpri...

1 día ago | 0

Question

Identify Simulink blocks by shape and ports?

Is there a facility to help people figure out what block shapes are which Simulink / Simscape blocks? I see people posting Simu...

2 días ago | 0 answers | 0

Answered

I'm having problems copying a 4-D array

https://www.mathworks.com/help/releases/R2017a/matlab/ref/imread.html?searchHighlight=imread&s_tid=doc_srchtitle#inputarg_idx T...

I'm having problems copying a 4-D array

https://www.mathworks.com/help/releases/R2017a/matlab/ref/imread.html?searchHighlight=imread&s_tid=doc_srchtitle#inputarg_idx T...

2 días ago | 1

Answered

How can I best receive data from a web hook into Matlab?

The URL for the webhook could be connected to a webserver on your host that accepted the request (such as with PHP or ASP), cons...

How can I best receive data from a web hook into Matlab?

The URL for the webhook could be connected to a webserver on your host that accepted the request (such as with PHP or ASP), cons...

2 días ago | 0

| accepted

Answered

How to deal with table

Removing entries that have empty exData: mask = cellfun(@isempty, newT.exData); newT(mask,:) = []; If I understand correctly,...

How to deal with table

Removing entries that have empty exData: mask = cellfun(@isempty, newT.exData); newT(mask,:) = []; If I understand correctly,...

2 días ago | 0

| accepted

Answered

While loop for sum

n = 1; while true do something n = n + 1; if n > N; break; end end or n = 0; while true n = n + 1; if n > ...

While loop for sum

n = 1; while true do something n = n + 1; if n > N; break; end end or n = 0; while true n = n + 1; if n > ...

2 días ago | 0

| accepted

Answered

fixed points in the plots

syms A B G A, B, and G are created as scalar symbols f = matlabFunction(sum1m2, 'vars', [A, B, G]); g = matlabFunction(sum3...

fixed points in the plots

syms A B G A, B, and G are created as scalar symbols f = matlabFunction(sum1m2, 'vars', [A, B, G]); g = matlabFunction(sum3...

3 días ago | 0

Answered

reset button gui matlab

cla RESET deletes all objects (including ones with hidden handles) and also resets all axes properties, except Position...

reset button gui matlab

cla RESET deletes all objects (including ones with hidden handles) and also resets all axes properties, except Position...

3 días ago | 0

Answered

Issue with lsqnonlin function solve

fix_values is a column. You subtract something from it (suppose it is a column as well), getting a column. Then you try to ^2 th...

Issue with lsqnonlin function solve

fix_values is a column. You subtract something from it (suppose it is a column as well), getting a column. Then you try to ^2 th...

3 días ago | 0