Answered
How to create a list of matrices??
You would have to construct a custom class for that, and have it define subsref() or use the newer facility to define a method s...

4 years ago | 1

Answered
2 boxplots overlayed - how to
You can use hold on and then boxplot() again. The second boxplot may use the same colors as the first, which is probably going...

4 years ago | 0

| accepted

Answered
When coding of function that shows error in yellow underline.
f=0; % After 1st iteration while norm(nc) > eps x=x+alp*nc; f=fc; gf=gfc; n=nc; H=Hc; fc=@(x1,x2) ((x1).^2+2*(x...

4 years ago | 0

Answered
Solve command breaking when certain numbers are inserted?
Never eval() a symbolic expression. There is no documented eval() for symbolic expressions. In practice, eval() of a symbolic ...

4 years ago | 1

| accepted

Answered
Error with writing a function
The existing end on the last line of your code is the end matching the if statement. You need an additional end statement matchi...

4 years ago | 0

Answered
How to find the closest point to a line
See https://www.mathworks.com/matlabcentral/answers/95608-is-there-a-function-in-matlab-that-calculates-the-shortest-distance-fr...

4 years ago | 0

| accepted

Answered
Why ODE solver tspan step size results with the same length are different?
z = 149×1 ... 0.7695 A span of 0.7695 in 149 steps is an average step size of 0.00516778523489933 not of 0.0019 . Your syste...

4 years ago | 0

| accepted

Answered
time analysis of data
I might suggest using detectImportOptions() on the file. Then use setvartype() to set the second and third columns to DateTime, ...

4 years ago | 0

Answered
How to select Ethernet connection for UDP send/receive
As a standard, Simulink always sends data over the Built-in Ethernet. No, as a standard, Simulink relies on the operating syste...

4 years ago | 0

Answered
how to read an audio file with a function that support code generation for Raspi?
You can use putFile() to copy the file from the host to the Pi. But once it is there, there is no built-in support from MATLAB t...

4 years ago | 0

| accepted

Answered
non-uniform symmetric grid in 1D
No, there is no simple command for it. If you have the first half, say a row vector B, then you can build the rest as [B, ENDV...

4 years ago | 0

Answered
matlab values returned by getparam ara all considered as string
No, get_param() is the only documented method to retrieve parameters. Parameter values are stored as character vectors in the m...

4 years ago | 0

| accepted

Answered
How can I transform this curved wall to a flat wall without any distortions in the image? Is there any code available for it?
To convert the curved wall to a flat wall without any distortions in the image then you will need to do a Deep Learning-style se...

4 years ago | 1

Answered
How to test for errors on a function inputArgs
For the case of being called with no parmeters or too few parameters, you can use nargin() to test how many parameters were prov...

4 years ago | 0

Answered
griddata vs griddedinterpolant vs scatteredInterpolant for given data
griddedInterpolant -- if you do not pass in vector x and vector v (1D case) -- if you have 2 or more dimensions -- then the inpu...

4 years ago | 1

| accepted

Answered
Why does vpa give a sym class variable?
MATLAB processes all of the parameters before it calls the function. So it first processes cos(10) . 10 is a double precision nu...

4 years ago | 0

| accepted

Answered
Renaming the fields of structure
I suggest using struct2cell() followed by cell2struct() (with the new field names) This always feels like "cheating" to me, but...

4 years ago | 0

Answered
How do I turn off arrowhead using quiverm (Mapping Toolbox)
If I read the code correctly, then if you pass a marker specification to quiverm as part of the linespec (expected to be the fif...

4 years ago | 0

| accepted

Answered
SOR method : error"Unable to perform assignment because the size of the left side is 0-by-1 and the size of the right side is 3-by-1."
X( : , 1 ) = X0; array X is not initialized in your code, so it will have whatever size it happened to have in your workspace, ...

4 years ago | 0

Answered
How to create a Binary image from two columns of raw data
filename = 'matlab.mat'; datastruct = load(filename, 'pdw'); pdw = datastruct.pdw; targetsize = [930 1860]; %rows, column...

4 years ago | 0

Answered
i have arrays of size 234X64X8, 234X64X8,234X64X8 and 234X64X8 inside a cell of size 4X1. i want it to be a shape of 936X256X32 as a 1X1 cell. how to do?
Suppose you have A = [1 2 3; 4 5 6] B = [7 8 9; 10 11 12] size(A), size(B) What are the ways you can arrange them? C1 = cat...

4 years ago | 1

Answered
How to write a for loop ?
marker_labels_single = {'peppers', 'moths', 'grues'}; xlabels = marker_labels_single + "_x" ylabels = marker_labels_single +...

4 years ago | 1

Answered
using fill function to make shaded area
x = categorical({'AA', 'BB', 'CC'}); yraw = rand(50,3); ymean = mean(yraw,1); plot(x, ymean, 'b'); s = std(yraw, [], 1); ho...

4 years ago | 1

| accepted

Answered
Can't figure out how to fix endless while loop
I suspect you are looking for something like initial_Prf = 1; num_k = length(To_3); Output = zeros(num_k, 1); % Pre-allocati...

4 years ago | 0

Answered
Code is not running "Output argument "root" (and possibly others) not assigned a value in the execution with "Newton" function. "
When the count gets too large you return without having assigned to root

4 years ago | 0

Answered
How do I create a video mp4 output from the following code?
See https://www.mathworks.com/help/matlab/ref/videowriter.html Note that the step() call is entirely valid but in the last ye...

4 years ago | 0

| accepted

Answered
plot multiple vertical line on the same graph
You can pass a vector to xline(). That would be for the case where you want the line to extend vertically from edge to edge.

4 years ago | 0

| accepted

Answered
Execution of script BuildExpertSystem as a function is not supported
your BuildExpertSystem is a *script* that builds a 3 x 2 cell array and then throws it away. But you are invoking it as a functi...

4 years ago | 0

Answered
How many backup installations allowed under commercial licensed?
The License Centre shows you Activation Label for each machine activated against a license. You can revoke individual activation...

4 years ago | 0

Answered
Index one multidimensional array using another
The indices you get back from max are relative to the dimension searched over, except when you use the relatively new 'linear' o...

4 years ago | 0

| accepted

Load more