Divide line in multiple segments [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.
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.

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.

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

How to explain this following code? [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.
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

Calculate the numbers in Scala [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 12 years ago.
I can calculate the expressions, and term but I don't understand what is tregonometric functions. Are they Expressions or Terms or Items? How to write the algorithm of calculation of Pi and tregonometric functions. Cos, sin....
Please if you know give me a hint.
Try a web search again, this time using the correct spelling "trigonometric functions". Algorithms for calculations like this date back at least to ancient Greece and you'll find them in a great many maths textbooks.
I suggest you try to do your own homework, then (and only then) come back to stack overflow if you have some particular issue with Scala syntax that prevents you from implementing your chosen algorithm. In the meantime, this isn't a proper or valid question.