Answered
why this gives me "Index exceeds matrix dimensions?" can any one help me. Thanks in advance
The problem is with img = imshow('...') As per the documentation of <https://www.mathworks.com/help/matlab/ref/imshow.ht...

10 years ago | 0

Answered
Matlab Script-Moving of multiple files from multiple folders into specific folders
If the destination folders don't already exist, then you could just rename the original folders. Assuming, the destination alrea...

10 years ago | 0

Answered
need mfile for insertMarker command.
The file is copyrighted by Matlab. That means we are not allowed to give you this file. If you *have to* use insertMarker, th...

10 years ago | 0

| accepted

Answered
Re-Initialze existing cell with zeros without specifying dimensions
To set all the values of array |x| to 0: x(:) = 0;

10 years ago | 0

| accepted

Answered
Assigning alphabets to a range of numbers.
Your question is really not clear. Possibly: v = randi([0 20*26-1], 1, 20) %vector of random number bins = 0:20:20*26; ...

10 years ago | 0

Answered
Can Matlab handle .NET methods that have a return type and a REF or OUT parameter ?
<https://www.mathworks.com/help/matlab/ref/methods.html |methods|> or <https://www.mathworks.com/help/matlab/ref/methodsview.htm...

10 years ago | 0

| accepted

Answered
how do I print a txt file of integers and floats?
I suspect that your |dlmwrite| call didn't work as expected because |A| is some integer class, so |B| gets converted to integer ...

10 years ago | 0

Answered
using find(ismember) instead of a loop?
Note that the |find| was completely unnecessary in your original example, you could just have used the logical array returned by...

10 years ago | 0

| accepted

Answered
Need to replicate a matrix in which a specific element in the matrix gets an addition
There are a few oddities with what you have written. First, i = 1 while i < 4 %do something i = i +1; ...

10 years ago | 1

| accepted

Answered
How to update a value in different raw after performing validity check at one raw?
If I understood correctly file = {'No','Question','Length';'1','how are you?','';'2','What is your name?','';'3','Where do ...

10 years ago | 0

Answered
How to combine the elements of several identical cell structure ?
Note: there is no cell array in your mat files, just a scalar structure. Here is how I'd solved your problem: srcdir = '...

10 years ago | 0

Answered
How to read multiple values in the same sheet without xlsread
As per the comments to the question: panelvalues = xlsread('Input.xls', 'Value', 'K12:K28') nbp = panelvalues(1); %row ...

10 years ago | 0

Answered
Waves spectrum in a string
There clearly is a problem with your function |realistic|. Your main script assumes that |y_next|, |y_current|, and |y_previo...

10 years ago | 0

Answered
How to separate the field from a structure in MATLAB?
Well, unless I completely misunderstood your question: x_constraint = yourstructure.X; y_constraint = yourstructure.Y; ...

10 years ago | 0

Answered
Mean of 10000 images
Use the <https://www.mathworks.com/help/matlab/ref/mean.html |mean|> function then, which does not suffer from overflow. Assumin...

10 years ago | 2

| accepted

Answered
Error ' index exceeds matrix dimensions'? i had done arnold transform(48 iterations) and took DWT for each iteration. Here i need iterations from 19 to 29 only. but i got the error. what is the problem in my code. Help me resolve the problem. thank u
It's not clear where the error comes from in your code. In theory, there's no indexing that exceeds any matrix dimension, *unles...

10 years ago | 0

| accepted

Answered
Algebra function with table and vector
First, some points not really related to your question: 1. i = 1; for i = i:a While the above will work and do wha...

10 years ago | 1

| accepted

Answered
How to convert RGB to gray automatically in cells?
cellarrayofgrayimages = cellfun(@rgb2gray, cellarrayofrgbimages, 'UniformOutput', false);

10 years ago | 0

Answered
How do I save an image with a name same as the original image?
Your question is puzzling: since you manage to come up with some fairly complex code it should be obvious to you what needs chan...

10 years ago | 1

| accepted

Answered
i have a column matrix [23; 34;22;13]. i need to create set of column matrixs ,which give 1 and -1 in numbers if the next number is less than and larger than.
One possibility: A = [23; 34; 22; 13]; out = arrayfun(@(idx) sign(A(idx+1:end) - A(idx)), 1:numel(A)-1, 'UniformOutput',...

10 years ago | 2

| accepted

Answered
How to find variance of several images in MATLAB
The best way for you to check if your code is working is to try it on some simple images (e.g. an image made of just 127, anothe...

10 years ago | 1

| accepted

Answered
Add pad array for image only to top and bottom
Isn't the problem obvious if you read the documentation of <https://www.mathworks.com/help/images/ref/padarray.html |padarray|>?...

10 years ago | 0

| accepted

Answered
reading text from various positions
Not having read the other answers, here is how I would deal with your problem: filecontent = fileread('C:\somewhere\Yourfil...

10 years ago | 0

Answered
How to combine two matrices of same size such that corresponding columns are concatenated as strings?
Wouldn't 10*x + y be sufficient in your example? Otherwise for a completely generic solution, since you want string ...

10 years ago | 1

| accepted

Answered
Lagrange Interpolation. Error: Subscript indices must either be real positive integers or logicals.
Not even trying to understand your algorithm, there are glaring problems with your code: sum = 0; L = sum + prod; Thi...

10 years ago | 0

| accepted

Answered
Identify and delete a specific column?
YourCellArray(strcmp(YourCellArray(1, :), 'O'), :) = [] will delete all columns for which the first row is 'O'. With reg...

10 years ago | 1

| accepted

Answered
How can I read a set of images automatically in cell format?
As the others have answered, use |dir| to get the list of files and a loop (or arrayfun) to read their content into a cell array...

10 years ago | 1

| accepted

Answered
Find Median of the second column when first column is Date
In excel, you would be able to do this easily with a pivot table if only pivot tables supported calculating the median (you can ...

10 years ago | 1

| accepted

Answered
Calculate difference in Euler angle
Use <http://www.mathworks.com/help/matlab/ref/mod.html modular arithmetic>: mod(1-359, 360) For pitch: mod(pitch2 -...

10 years ago | 0

Load more