Answered
Error using odearguments (line 113) Inputs must be floats, namely single or double.
You need to use matlabFunction() to turn your symbolic expressions into numeric code. Be sure to use the 'vars' option to contro...

3 dagar ago | 0

Answered
Does not properly read csv file
readcell() instead of readtable(). Your file mixes data types.

3 dagar ago | 0

| accepted

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...

3 dagar ago | 0

| accepted

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...

3 dagar 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)...

3 dagar 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...

3 dagar 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]...

3 dagar 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...

3 dagar 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...

3 dagar ago | 0

| accepted

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...

3 dagar 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...

3 dagar ago | 0

| accepted

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 ...

4 dagar 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...

4 dagar 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...

4 dagar 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...

4 dagar ago | 0

Answered
matlabFunction: Index exceeds the number of array elements for Matlab R2021a
matlabFunction(C, 'vars', {q, qdot, alpha, l, rho}, 'file', strcat(dpath,'/C_fun'), 'Optimize', true); Index exceeds the number...

4 dagar 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 ...

4 dagar 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...

4 dagar 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...

4 dagar 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.

4 dagar 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...

4 dagar 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...

4 dagar 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...

4 dagar 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...

4 dagar 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...

4 dagar ago | 0 answers | 0

0

answers

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...

5 dagar 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...

5 dagar 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,...

5 dagar 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 > ...

5 dagar 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...

5 dagar ago | 0

Load more