Answered
how to compare string?
string comparisons are done with <https://www.mathworks.com/help/matlab/ref/strcmp.html |strcmp|>, or <https://www.mathworks.com...

8 years ago | 2

Answered
xlsread works in 2015b but not in 2017b
The error would indicate that for some reason matlab cannot see the file |matlabroot\toolbox\shared\io\+matlab\+io\+internal\+ut...

8 years ago | 1

Answered
How to find pixel counts from an Histogram for 2D uint16 images
You made two mistakes: * because you pass a 1x1 x value and a 1x2 y value to line, it actually plots two points, not a line. ...

8 years ago | 0

| accepted

Answered
how can I store this data in an array using loop?
You forgot to mention what _it is not working_ mean: You get |error using / Matrix dimensions must agree|. That's because you f...

8 years ago | 1

Answered
How to create a for loop comparing excel vectors to (sub)folders?
Nothing to do with the use of a loop itself but there's certainly a break in logic in what you have written. For a start, you ne...

8 years ago | 0

| accepted

Answered
How to detect a sequence in an array [extended]
v = [1 770 2 3 4 5 6 897 7 8 769 9 10 11 897 12 13 14 770 15 770 897 769] %demo data filteredv = v(ismember(v, [770 769 897...

8 years ago | 3

| accepted

Answered
extracting data from a multidimensional array
A few comments: * a matrix of size |[52, 141, 43]| has 52 *rows*, 141 *columns* and 43 *pages*. * |find| is frequently over ...

8 years ago | 0

| accepted

Answered
Dynamic comments on variables?
Short answer is no. Such a thing would have to be directly integrated into matlab, it's not something you can add. I'm not aware...

8 years ago | 1

Answered
Sort cell elements according to one column
[~, order] = sort(cell2mat(err(:, 2))); sortederr = err(order, :) _edit: actually a lot simpler since <https://www.mathw...

8 years ago | 1

| accepted

Answered
How can I find all the indices (especially of the repeating elements) of an array in terms of another array?
I'm not entirely clear on what you want. I suspect it may be: [isinecg5, locinecg5] = ismember(smax_PVCuw, ecg5); locins...

8 years ago | 1

Answered
Readtable function has some kind of limitation on the number of rows and columns?
Stepping through the |xlsread| code and looking at the content of the excel file in excel VBA editor reveals the reason why you ...

8 years ago | 5

| accepted

Answered
Subscripted assignment dimension mismatch
That |tmp|, which is |DeltaV| in |FABLE| is created by the function |LowThrustTransfer_OutOfPlane_new_param|. So you will have t...

8 years ago | 0

Answered
executing a loop most probably while
First, some important notes group(x, y); g = ans; Do not do this! This is just a more complicated and confusing way o...

8 years ago | 1

| accepted

Answered
Readtable function has some kind of limitation on the number of rows and columns?
_"but it doesnt work"_ is a useless statement on its own. In what way _it doesnt work_. You get an error? (if so, which one?), y...

8 years ago | 0

Answered
Check a date in a formatted text file for a match, regexp help
A fairly straightforward method: %read whole file in one go fid = fopen('q_d_daysctl.txt', 'rt'); %using 't' to autocon...

8 years ago | 2

| accepted

Answered
How can I interface the XML SCHEMA with the MATLAB through the set of Libraries
With any third party tool, the best place to get support is with their own forum, if they have one, or by contacting the authors...

8 years ago | 0

Answered
How do I divide a selected ROI with another selected ROI from the same image?
_I think I should use imdivide_ That, or simply use |./| directly, as that's all |imdivide| will end up doing after a few checks...

8 years ago | 0

Answered
Help with isnan with two matrices of unequal dimensions
_"yes use shorter vectors"_ So in effect, you're telling us to truncate the longer one so that it is the same length as the o...

8 years ago | 0

| accepted

Answered
Creating heading for table that changes depending on datainput
Assuming |data| is also a table: t = [data(:, {'StudentID', 'Name'}), ... copy part of original table array2table...

8 years ago | 2

| accepted

Answered
splitting a char with no delimiter
_when I look in my code A(1) gives me 'A2C9', not the individual 'A_ As I pointed out A = {'A2C9'} is not the same th...

8 years ago | 1

| accepted

Answered
How can I remove this error: Error: File: RF_1.m Line: 104 Column: 1 Function definitions are not permitted in this context.
Function definitions were not allowed in scripts before version R2016b. The script you have is not designed for R2015 (a or b). ...

8 years ago | 1

| accepted

Answered
Array operations- vectorization. Error with matrix dimensions.
The problem is simple, you're looking at the most recent documentation but you're using an old version of matlab, earlier than R...

8 years ago | 0

| accepted

Answered
How can I create a multiple fill with different colors using loops for an arbitrary vector
As suspected a loop is not required: X = [1 2 2 2 4 4 5 5 3 3 3 1 1 1]; seqlengths = diff([0, find(diff(X)), numel(X...

8 years ago | 2

Answered
Vectorise for loop checking for values in intervals
If using R2016b or later: result = any(a >= b(:, 1).' & a <= b(:, 2).', 2) Otherwise result = any(bsxfun(@ge, a, ...

8 years ago | 0

| accepted

Answered
Are there any known algorithms for identifying the coordinates of the nearest neighbours of a 2D square lattice?
Assuming the lattice is not too huge, can't you just calculate the distance from your point to every lattice point, sort the dis...

8 years ago | 0

| accepted

Answered
algorithm to find out combinations of known vectors for resultant vector
Assuming used/not used, this is fairly easy when the size of the set is reasonably small (~ 20 elements max) as you can just try...

8 years ago | 0

| accepted

Answered
Addition of certain consecutive elements along column in a matrix.
This should do it: A=[ 0 0 0 0 1; 1 0 0 0 0; 1 0 0 0 0; 0 0 1 0 0; 0 0 0 0 1; 0 0 0 0 1; 0 0 0 0 1; ...

8 years ago | 0

| accepted

Answered
how to break the loop
_What am i doing wrong?_ * Using |length| with a matrix ( |length| can be the number of rows or columns) * Indexing past the...

8 years ago | 0

| accepted

Answered
is there a way to make a loop that reads the number of columns in a row and generates a string for every value read. For example
I'm also unclear on the question. _"generates a string for every value"_: use |compose|: compose("Column %d", 1:10)

8 years ago | 0

| accepted

Answered
Can I import classes in an interface class in matlab?
I'm not sure what you mean by _import_. All |import| does is to allow you to refer to functions and classes in packages witho...

8 years ago | 1

| accepted

Load more