Answered
I'm trying to compute f(x0), f(f(x0)) (written as (f 3 )(x0)), and (f 100)(x0). With the given initial value x0 ∈ [0, 1]. But i'm not sure where I'm getting the error
This is not Matlab. There is neither a "Let" command, nor a "For". x₀ is not a valid name of a variable. Please read the Gettin...

5 years ago | 0

| accepted

Answered
Combine vectors of random length as columns in a matrix - without a for loop
At first a cleaner loop with a proper pre-allocation instead of the growing of the output: L = 20; p = 3; tic n = poissrnd(p...

5 years ago | 1

| accepted

Answered
Print rows of strings above previous csv table
I do not know an operating system, which allows to insert bytes at the beginning of a file. Only appending is used. So your way...

5 years ago | 0

Answered
Too many output arguments using histogram function
The command histogram replies 1 output only. Unfortunately in your code the outputs are called "a" and "b", such that I cannot...

5 years ago | 0

Answered
read Barcode is showing error- Undefined function or variable 'readBarcode'.
Do you have a license for the Computer Vision Toolbox?

5 years ago | 0

Answered
Help with logic inside of a solver
The expression "previous iteration of the solver" is not meaningful. Remember, that the integrator can reject steps and evaluate...

5 years ago | 0

| accepted

Answered
loading .xlsx files with *_abcd.xlsx (parts of name)
See: FAQ: How can I process a sequence of files? Folder = 'C:\Temp\': FileList = dir(fullfile(Folder, '*_af_foam.xlsx'); for ...

5 years ago | 0

Answered
Add / subtract / multiply / divide matrix by vector along defined dimension
A = rand([5, 11, 4, 11]); B = rand([4, 1]); % Or [1, 4]? "[4]" is no valid size in Matlab C = A ./ reshape(B, [1, 1, 4, 1])...

5 years ago | 2

Answered
MATLAB code error verification
This means, that in the failing line of code an index is applied to the 2nd dimension of a variable, which has the size 1 only i...

5 years ago | 0

Answered
how can i do Trapezoidal rule? - error
Which error message do you get? This should fail, if x and y are symbolic variables: [X,Y] = meshgrid(x,y); And you do no...

5 years ago | 0

| accepted

Answered
Naming variables according to the values of another variable
Don't do this. Hiding indices in the names of variables is a bad programming pattern, which is avoided consequently by experienc...

5 years ago | 1

| accepted

Answered
I am having a problem with matrix dimension
Your y and yref are defined as globals, but they do not get a value anywhere. Therefore I get this error message running your co...

5 years ago | 1

Answered
Function requires more input arguments to run?
While the actual code of the function does not matter, it is important to know, how you try to call it. If you use the green tri...

5 years ago | 0

| accepted

Answered
Saving large Tiff in MATLAB leads to corrupt file
I can reproduce the problem with Matlab 2018b. imwrite(mat, 'test.tif') is not successful also.

5 years ago | 0

Answered
Populating matrix in for loop generates error
Use the debugger to examine the problem: dbstop if error Then run the code again. When Matlab stops at the error, check the si...

5 years ago | 0

Answered
Breaking a Number into 1000s, 100, 50, 10, 5,1
This sounds like a homework question. So please show us, what you have tried so far and ask a specific question concerning Matla...

5 years ago | 0

Answered
invoking a matlab program without using "return" and "go to"
Who forbids useful commands?!? Is it an anti-homework to teach bad programming styles? function myTest for unused = 1 dis...

5 years ago | 0

Answered
Delete some columns from structure array
toDel = false(1, numel(S)); for i1 = 1:numel(S) data1 = S(i1).f1; n1 = numel(data1); for i2 = i1 + 1:numel(S) ...

5 years ago | 0

| accepted

Answered
Please help me,,, I want to bit shift to the right(can`t use bitsrl)
bitshift(x, -1) See: doc bitshift or https://www.mathworks.com/help/matlab/ref/bitshift.html

5 years ago | 0

| accepted

Answered
How to randomise the order of only some images in a array
choseImage is a vector, but here you access it as matrix with 2 indices: choseImage(:,k) = choseImage(randperm(number),k); To ...

5 years ago | 0

| accepted

Answered
Writing text from a pre-existing notpade?
myPath = fileparts(mfilename('fullpath')); Name = 'test'; delete(fullfile(myPath, [Name, '.odb']); delete(fullfile(myPath, ...

5 years ago | 1

| accepted

Answered
failed binary to decimal
How do you try to run the code? Using the green triangle in the editor? Then now input argument is used. Call it from the comma...

5 years ago | 0

Answered
ranges of dimensions when using nan
isnan is the function, which replies a logical array with the same dimension as the input and TRUE values, where the input has N...

5 years ago | 0

| accepted

Answered
Dividing a matrix by a different size vector
The division of a [733x2] matrix by a [237x1] vector is not defined mathematically. Therefore it is impossible to apply any tric...

5 years ago | 0

Answered
accessing data in vectors
You can insert the lines in the code sections by clicking in the title bar for formatting on the icon for the code style. If you...

5 years ago | 0

Answered
I have a class which I need to create a GUI. I am new to MATLAB and could really use some help. error Function definition is misplaced or improperly nested.
"error Function definition is misplaced or improperly nested." This means, that you try to run the code in the command line, or...

5 years ago | 0

Answered
How to read the value of a variable that has dots in between
What does "I have a variable name" mean? Where does this variable exist? It is not a legal Matlab symbol so you cannot create su...

5 years ago | 0

Answered
ode15s and 0de23 very slow at high frequencies
Are you sure that the problem is stiff? If not, use ODE45 instead of the stiff solvers. The relative and absolute tolerances in...

5 years ago | 0

Answered
Invalid MEX file.Specified Module could not be found.
Please post the full error message as text. Important parts of the message are cropped. I assume, the MEx function was compiled...

5 years ago | 0

Answered
How to get pointer location as grid point of an axes in matlab guide?
It is hard to convert the global mouse position on the screen to a position in the axes. Therefore get(0,'PointerLocation') is n...

5 years ago | 0

| accepted

Load more