How to explain this following code? [closed] - matlab

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
can you explain me about this following code?? when the size newRowB (1,12), this code cannot work?
~any(diff([0;find(newRowB);12+1])>3));
thanks before

diff calculates the difference between the successive terms of the given input vector.
and
find locates elements of array X that are non-zero

Related

All possible combinations of words with given set of words [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a given set of alphabets say 11 letters. I want to find all possible word combinations of specific length say 5. These are numbers are dynamic. It doesn't matter to me if the resulted words do have a meaning or not.
Can someone please provide me with this kind of code or algo to follow. Or guide me right direction.
Thanks
This algorithm is a permutation. A relatively easy way is to use recursion to solve it.
Read this SO Question:
Sequence combinations of varying length using two 'alphabets'
Read "UPDATE 2:" in this question there he post his working code
All the best

In matlab is cell array of cell arrays equivalent to list of list [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm trying to implement functionality in matlab where I need the equivalent data structure to a list of lists. Based on what I have found is a cell array of cell arrays a good equivalent in matlab.
Thanks.
Yes, roughly... With the exception that lists are sequential-access and cell-arrays are random-access. ie the cell-array is in fact an array, not a list. I don't think there is a list analogue in MatLab, so this is the closest you'll get.

Divide line in multiple segments [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Let's say I want to divide timeline in linearly growing chops ranging from 1" (starting value) to 10" (end value). If the sum is given (e.g. 120") I would like to know the value of each segment.
How do I calcutlate that in matlab?
Thank you!
Use the linspace() function, which is for exactly this purpose.

To convert integer to hex in perl [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have an integer say 6677889.I want to use this value as hex that is 0x66778899 in my perl script.How to use that?Using sprintf,gives the direct hex value of that.I don't want that to happen.How to go abt it ? Any suggestions please.
You mean something other than this?
% perl -e "print hex 6677889"
107444361

matlab imread() read jpg error under linux [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
matlab7.10.0(R2010a)
I=imread('input-small.jpg');
???Error using ==> jpeg_depth
JPEG parameter struct mismatch: library thinks size is 632, caller expects 616
Error in ==> readjpg at 13
[depth,msg]=jpeg_depth(filename);
Error in ==> imread at 441
[X,map]=feval(fmt_s.read,filename,extraArgs{:});
I just got this error with R2010b. There's no relation to the picture itself.
It was using the system's JRE. When I switched it back to the JRE shipped with Matlab it worked.