Respondida
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 ...

más de 14 años hace | 0

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

más de 14 años hace | 1

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

más de 14 años hace | 0

Respondida
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...

más de 14 años hace | 1

| aceptada

Respondida
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;

más de 14 años hace | 0

| aceptada

Respondida
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...

más de 14 años hace | 0

Resuelto


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...

más de 14 años hace

Respondida
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...

más de 14 años hace | 0

| aceptada

Resuelto


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...

más de 14 años hace

Resuelto


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...

más de 14 años hace

Respondida
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...

más de 14 años hace | 0

| aceptada

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

más de 14 años hace | 0

Respondida
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...

más de 14 años hace | 0

| aceptada

Respondida
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 # ...

más de 14 años hace | 0

Respondida
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...

más de 14 años hace | 1

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

más de 14 años hace | 0

| aceptada

Respondida
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...

más de 14 años hace | 0

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

más de 14 años hace | 0

| aceptada

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

más de 14 años hace | 0

| aceptada

Respondida
array element sum wih condition
Try the function, CUMSUM

más de 14 años hace | 0

| aceptada

Respondida
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...

más de 14 años hace | 1

Respondida
??? 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...

más de 14 años hace | 0

Respondida
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( ...

más de 14 años hace | 0

| aceptada

Respondida
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...

más de 14 años hace | 0

| aceptada

Resuelto


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

más de 14 años hace

Resuelto


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...

más de 14 años hace

Respondida
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; ...

más de 14 años hace | 0

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

más de 14 años hace | 1

Resuelto


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

más de 14 años hace

Respondida
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...

más de 14 años hace | 0

Cargar más