Answered
Linear constraints using lsqnonlin
lsqnonlin() does not support constraints other than upper bound and lower bound. I suggest you minimize the norm() of F(x,y,z)-...

4 years ago | 0

| accepted

Answered
i couldn't understand the problem in it
dy = zeros(12,1); You initialize 12 return values but you then only store up to dy(9). You only need zeros(9,1)

4 years ago | 0

| accepted

Answered
minibatchqueue or arrayDatastore drops my data precision from double to single
Gpu training does not support double precision. If you look at the available options, precision cannot be selected.

4 years ago | 0

Answered
How do I plot a summation equation?
You are summing exp() of values that are purely imaginary and are mostly not integer multiples of π. The individual entries are ...

4 years ago | 0

Answered
How to change the matlab maximum name length?
No there is no way to do that. The variable names and field names of struct and property names of objects are all stored as fixe...

4 years ago | 0

Answered
dividing defined variable by named variable
a=sqrt((d.^2)*(3^2)) 3^2 is 9 so inside the sqrt() you have 9*d^2. sqrt() of that is sqrt(9)*sqrt(d^2). For positive d that...

4 years ago | 0

Answered
What is the type or language of programation that MATLAB use? language like C++, JavaScript etc.
The internal implementation of MATLAB is written in (alphabetical order) * ActiveX / DCOM * C * C++ * Fortran * Java * M...

4 years ago | 1

| accepted

Answered
How can I read values from an ultrasonic sensor connected to an Arduino in Matlab app designer?
EditFieldValueChanged is only invoked when the user edits the field. You need to update the field as you store new app.distance ...

4 years ago | 0

Answered
Must be a text scalar when using eval() function problems?
eval() is defined *only* for character vectors and string scalars. It is not defined for numeric values, and it is not defined f...

4 years ago | 1

| accepted

Answered
Issue with readtable() reading strings
filename = 'as appropriate'; opt = detectImportOptions(filename); opt = setvartype(opt, 'Note', 'char'); T = readtable(filena...

4 years ago | 0

Answered
Array indices must be positive integers or logical values. Error in untitled4 (line 9) max(num)=0;
The syms is unused by the remainder of the code. You are not validating that the user is entering a scalar positive integer. Y...

4 years ago | 0

Answered
Can i convert a binary matrix to a function?
Yes, you can return a matrix from the function. However, that would be considered multiple objectives, and you would need to use...

4 years ago | 0

Answered
Find the key for vector transformation
You do not want to minimize B-A(KEY): those are vectors and you cannot minimize a vector. A= [25 21.2 0.4 3.5 15 60 14 8.1 16.9...

4 years ago | 0

| accepted

Answered
Unable to resolve the name dsp.iFFT
The function name is dsp.IFFT -- upper case I rather than lower case i

4 years ago | 0

| accepted

Answered
Pick just some elements of a 3Dmatrix and then reshape them in the original size
Assign tuttiE<max(tuttiE) into a variable, and use it to index tuttiE for clusterdata() purposes. Then create an array of zer...

4 years ago | 0

| accepted

Answered
i want to draw a half staircase sinusoidal curve
Use the Computer Vision insertShape function requesting a 'line' . The coordinates for the line would need to duplicate every m...

4 years ago | 0

| accepted

Answered
Error using imwrite command
MATLAB cannot automatically determine the image type being requested when you ask for a file name with extension jpg<SPACE> . ...

4 years ago | 0

| accepted

Answered
Constrained optimization on a finite set
https://www.mathworks.com/help/optim/ug/optimvar.html#mw_cedf0526-03c6-46b9-aba3-a694d89d1003 shows how to constrain a optimvar ...

4 years ago | 1

| accepted

Answered
Converting from floating point to fixed point.
The Fixed Point Toolbox fi() can be used to create a variety of fixed point formats. If you need to match a particular hardwa...

4 years ago | 1

| accepted

Answered
Why is the colormap value of my bar plot returning an error
CP(D,:) = (sum(P(:,:,D))./length(Is115)) .* 100; CP has not been initialized before that point. D = input("DAY #"); D is user...

4 years ago | 0

| accepted

Answered
Is there a way to simulate a struct with a array?
RTC_C_Calendar = zeros(Rows, 7,'uint32'); Now create variable names like dayOfWeek = 4; and then you can index RTC_C_CAL...

4 years ago | 0

Answered
Unrecognized function or variable 'max'.
Somewhere in that function, or in a function that the function is nested within, you assigned to a variable named "max". In doin...

4 years ago | 0

| accepted

Answered
Hello all, I am getting an error "Dot indexing is not supported for variables of this type."
I do not get that error when I test with R2022b on my system. Which MATLAB release are you using? I did have to make some chang...

4 years ago | 0

| accepted

Answered
How can I use "Epoch" as a variable?
https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.trainingoptionsadam.html#d124e171093 OutputFcn is defined as requirin...

4 years ago | 1

| accepted

Answered
How to assign filtered data of tables to new tables and then store them into a data structure?
tab_L1_DV_min(idx_cand_L1,:) = cand_cond_L1(cand_cond_L1.("DV_inters(km/s)")== min(cand_cond_L1.("DV_inters(km/s)")),:); ...

4 years ago | 0

| accepted

Answered
Why is my loop not running? (Error using / Matrix dimensions must agree)
cp(1) =(pd*1000)*(M)/((Ru)*(Tp(1)+273)); %[...] cp(i+1) =(p*Kr(i+1)*1000)*(M)/((Ru)*(Tp(i+1)+273)); cp is a matrix. B(i) = (...

4 years ago | 0

Answered
how to compute random??
while abs(A-0.5)>=tol n=n+1; n=rand; end n appears to be your counter. But you are overwriting n with a random numbe...

4 years ago | 0

Answered
Reading txt file, finding each string extracting info
If you have the text all within one long string, S, then it will need to be split. But if you used SS = readlines() then you can...

4 years ago | 0

| accepted

Answered
How to create a table from strings and numerical data?
Provided that you already initialized YourTable with variable type string for the first variable and cell for the second variabl...

4 years ago | 0

| accepted

Answered
How can I call a value in side the a function which is already evaluated.
It is not possible to do what you want to do using eval(). You will need to rewrite your code.

4 years ago | 0

Load more