Answered
average distance between column values in a matrix
See the answer, <http://www.mathworks.se/matlabcentral/answers/37232-how-to-convert-0-s-and-1-s-to-intergers How to convert 0's ...

14 years ago | 0

Answered
Arithmetic in Matlab
Search for "Arithmetic Operators" in the online help

14 years ago | 1

Answered
How to use set() in a loop?
Try something like this: name_list = { 'name1', 'name2', 'name3', .... }; % row vector for name = name_list ...

14 years ago | 0

Answered
How to convert 0's and 1's to intergers
If that happens to be a string of characters, try: cac = regexp( '000001111111111000000000000011111', '(0+)|(1+)', 'match...

14 years ago | 1

| accepted

Answered
How do I assign values of 0 or 1 to numbers greater or lesser than a value?
Logical indexing is the answer! M( M < 37 ) = 0; M( M > 37 ) = 1;

14 years ago | 0

| accepted

Answered
Increasing of speed in numerical calculation
Something like this f( varargin{:} ) where varargin == {x,y,z} assuming the value of varargin is set in a c...

14 years ago | 0

Solved


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

14 years ago

Answered
fprintf to the command line
In FEX you will find <http://www.mathworks.se/matlabcentral/fileexchange/28067-text-progress-bar Text progress bar> and other te...

14 years ago | 0

| accepted

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

14 years ago

Solved


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

14 years ago

Answered
Display data from an online file
It is easier to handle the first four columns as text. readData is cell array of cell arrays. Delimiter takes care of the spaces...

14 years ago | 0

| accepted

Answered
how to define specific indexes in a dataset?
I guess this is not what you want? >> eval('31-12-2010') ans = -1991

14 years ago | 0

Answered
reading from txtfile
Try this %% lookup = { 0, 0, 0, 0, 255, 0, 0, 0, 255, 255, 127, 80, 46, 139, 87, 0, 255, 255}; names = { 'Unclassi...

14 years ago | 0

| accepted

Answered
Increasing of speed in numerical calculation
I tried to edit my answer and clicked the wrong button and it was gone. --- New answer --- Here is a small demo of # ...

14 years ago | 0

Answered
Matlab indexes
May be not all in the same place. There is a learning curve, which isn't as steep as I would like it to be. Search for "ind...

14 years ago | 1

Answered
Loop is not looping
M = []; for ii = 1 : large_number ..... if T(a,b,c)==0 M = cat( 1, M, [a,b,c] ); ...

14 years ago | 0

| accepted

Answered
Concatenating multiple matrices
Does all the data fit in memory? Are all the matrices of the same size? If that is the case M = nan( n1, n2, number_of_m...

14 years ago | 0

Answered
'{:}', ' .' '
Is that a serious question? Search for "Special Characters" in the documentation.

14 years ago | 0

| accepted

Answered
what the right function ?
If checkered is supposed to be a nested function if must be closed with the keyword *end*.

14 years ago | 0

| accepted

Answered
array element sum wih condition
Try the function, CUMSUM

14 years ago | 0

| accepted

Answered
how to correct this error
See the page "Avoid Mistakes While Editing Code" in the documentation. The Code Analyzer of the Matlab Editor works in the ba...

14 years ago | 1

Answered
??? Error using ==> times Matrix dimensions must agree
See the page "Avoid Mistakes While Editing Code" in the documentation. The Code Analyzer of the Matlab Editor works in the b...

14 years ago | 0

Answered
Most effective way to fix axes for 3-D animation
In the loop you only need to update the the XData, YData and ZData. Something like for ii = 1 : size( x, 2 ) set( ...

14 years ago | 0

| accepted

Answered
Disable visual interpolation in plots
There is a function named STAIRS. Doc says: "Stairstep graphs are useful for drawing time-history graphs of digitally sampled da...

14 years ago | 0

| accepted

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

14 years ago

Solved


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

14 years ago

Answered
Save/Restore Variable Editor State
I don't recognize the acronym "VE" Use SAVE and LOAD to handle the variables in the base workspace. list = who; ...

14 years ago | 0

Answered
counting data points
I learned this trick the other day: str = '11110111000001111100000111110000011111000001111100000'; cac = regexp( str...

14 years ago | 1

Solved


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

14 years ago

Answered
Convert to date, hour, and minute
I run this. Matlab seems to more clever than I anticipated. Is this documented behavior? str = '2011 95 1300' datest...

14 years ago | 0

Load more