Answered
Why am I getting this error?
Your code assigns to molaritet_NH4Cl if best_salt_1 or best_salt_2 are exactly 'NH4Cl ' with a trailing space if strcmpi(be...

4 years ago | 0

Answered
matlab double values saved into a cell as integers
h=uint16(c); That is a uint16 h = h + 1; Regardless of the actual implementation, with h being uint16, that is de...

4 years ago | 0

Answered
Solve indefinite integral with unknown lower limit
syms t positive

4 years ago | 0

| accepted

Answered
Nested Objective function with for loop structure
Suppose that you had a function that called itself (your main_fun calls itself for example.) That is a technique called "recursi...

4 years ago | 0

Answered
How do you divide 120 by x when x is (3,6] starting with x=0
x=0; while (x>2) & (x<=5) Your x starts out at 0 which immediately fails the x>2 test. Consider x=0; while x...

4 years ago | 0

| accepted

Answered
How do I modify my code to get rid of this error: "Index exceeds the number of array elements. Index must not exceed 1. Error in AEM614HW2Q2 (line 35) "
for theta = linspace(.001,pi-.001,20); theta is a scalar for n = 1:N C(j,n) = 2*b/(pi*c(j)) * si...

4 years ago | 0

Answered
Max difference in a table column
cNum = max(diff(distanceCol));

4 years ago | 0

| accepted

Answered
How to transform a cell of Different size arrays into a matrix
at a closer inspection i realized that the encoded cell arrays of the images that give the error are not the same size, so im wo...

4 years ago | 0

Answered
sorting 2d by double value.
I suggest that you store this as two separate variables, one of which is a string array and the other of which is a numeric vect...

4 years ago | 1

| accepted

Answered
Can I upgrade from 2020a to 2021a?
If you are currently under Software Maintenance Service (SMS), or if your SMS expired after March 11th 2021, then you are entitl...

4 years ago | 0

Answered
MATLAB code requires a loop explanation
k=i; while k>12 k=k-12; end m=k; That code is equiavelent to m = mod(k-1, 12) + 1; Another w...

4 years ago | 1

| accepted

Answered
Why does gcf in a GUIDE figure give the parent?
A figure becomes the current figure under any of the following circumstances: the figure is created with figure() [or some rout...

4 years ago | 0

| accepted

Answered
How to fix Attempt to grow array along ambiguous dimension. erro?
H=zeros(Nodex,Nt); That is a 2D array. H(T(i,j))=Cps*(T_c-deltaT); That and similar lines of code index the 2D array H wi...

4 years ago | 0

Answered
Invalid training data. Sequence responses must have the same sequence length as the corresponding predictors.
net = trainNetwork(GlucoseReadingsTrain,categorical(train_GR_output),layers,options); Your GlucoseReadingsTrain is 1749 x 84 Y...

4 years ago | 0

| accepted

Answered
how to save values in a matrix from a loop
clear all; x=[2 2 2 3 3 5; 6 6 5 5 5 7] f=size(x); c=1; y = {}; for i=1:f(1) y{i} = []; for j=1:f(2)-1 ...

4 years ago | 2

Answered
MATLAB in unexpected places
Using MATLAB to simulate a million golf-balls https://www.youtube.com/watch?v=b-pLRX3L-fg And running Snake https://www.yout...

5 years ago | 0

Answered
I want to get how many times a value sequence is repeated in a column and the average number of times it repeated in a sequence.
C = [0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 ] %for this...

5 years ago | 1

| accepted

Answered
How to find objects by number of children?
There is no way to do that other than methods similar to what you are doing already. You could modify your flow though figA...

5 years ago | 1

| accepted

Answered
Why do I get the error (not enough input arguments) when run the script about 2nd-order Adams-Bashforth (Explicit Method)?
%% 2nd-order Adams-Bashforh Solution move everything from that line onwards to a new file, and execute that other file.

5 years ago | 0

Answered
can we write hexadecimal values in matlab too?
https://www.mathworks.com/help/matlab/matlab_prog/specify-hexadecimal-and-binary-numbers.html 0x1FFFFu32 The C code is a...

5 years ago | 0

| accepted

Answered
Synchronize matlab software personality settings across platforms?
No, that is not supported at this time. You can look in p = prefdir() ls(p) with matlab.prf being the most-used one of those...

5 years ago | 0

| accepted

Answered
Invalid training data. For classification tasks, responses must be a vector of categorical responses. For regression tasks, responses must be a vector, a matrix, or a 4-D arra
net = trainNetwork(GlucoseReadingsTrain, categorical(train_GR_output), layers,options);

5 years ago | 0

| accepted

Answered
Number of observations in X and Y disagree.
net2 = trainNetwork(train_GlucoseReadings,yc1,layers1,opts); Your code uses a series of variables that are not well distinguish...

5 years ago | 0

Answered
Matlab function block Does not support 'fopen' code generation?
The code believes that binName is numeric. You need to modify the datatype on the inport to be string. You will also need to con...

5 years ago | 0

| accepted

Answered
fzero function not working for equation, says undefined for double
x=fzero(@HW6Q2,1) function f=HW6Q2(x) f=3*cos(x^(1/5))-x^3; end You must not have saved the code under the file name H...

5 years ago | 0

| accepted

Answered
Code runs very slow
L = pi; N = 1024; x = linspace(-5,5,N); dx = 2*L/(N-1); %Define rectangular function f = rectangularPulse(-1,1,x); %Comput...

5 years ago | 0

| accepted

Answered
Create a circular 3D surf plot
%% Assign constant v=0.33;% poisson ratio E=73.1*10^9; % young's modulus [N] ti=0.1185;% thickness of bulkhead intact [m] td...

5 years ago | 0

Answered
How to Create a Surface Plot from Table Data Imported from Excel
x = PlotTestS1.TetherK; y = PlotTestS2.TetherCn z = table2array(PlotTestS3) ; surf(x, y, z, 'edgecolor', 'none')

5 years ago | 0

Answered
How to write names of txt files on top cell of each calculated column in an excel file?
array2table with the 'variablenames' option, and writetable() instead of xlswrite

5 years ago | 0

| accepted

Load more