Answered
What is wrong with my fprintf?
_"What is wrong with my fprintf?"_ &nbsp I assume that you intend to control the number of decimals places with the variable *|D...

9 years ago | 0

Answered
Trying to find all the average of negative numbers under certain conditions
Replace avgNeg = mean(y>0 & x<0); %Avg Negatives by avgNeg = mean( x(y>0 & x<0) ); %Avg Negatives

9 years ago | 0

| accepted

Question


Is there a term for "mypack.mysubpack.myFcn"?
Please give me a term for the text string, which is used to invoke a function. Before package folders were introduced *function ...

9 years ago | 2 answers | 1

2

answers

Answered
How to order cell rows
Copy = [ 2x1 double] [ 2x1 double] [ 2x1 double] [ 2x1 double] [33x1 double] [33x1 double] [33x1...

9 years ago | 0

Answered
how to change unique format in the date field
A loop together with >> datestr( datevec( a{1}, 'dd-mm-yy' ), 'dd-mm-yyyy' ) ans = 05-03-2013

9 years ago | 0

Answered
How can I make this code faster?
I've done three things * Put the code in a function, because I'm more comfortable with functions than with scripts * Removed...

9 years ago | 1

| accepted

Answered
Save each column of a matrix in a seperate .csv file
* _"save each column of the sample matrix in a separate .csv file"_ &nbsp e.g. *|Channel01|*, *|Channel02|*, etc. * _"how t...

9 years ago | 0

| accepted

Answered
How can I have a warning issued when matlab "rounds" a large number to Inf?
I have a hammer and thus, to me your problem looks like a nail. The "hammer" is side effects of &nbsp *|dbstop ... if foo|* &nbs...

9 years ago | 2

Answered
Extract words between characters.
This is one way with regexp %% str = fileread('items.txt'); xpr = '(?://=+\s*//\s)(.+)(?:\s*//=+\r\n)'; cac = re...

9 years ago | 0

| accepted

Answered
remove a part form a vector
*|setdiff|* does it >> k=[1,2,3,4,5,6,7,8]; i =[3,4,6,7]; >> setdiff( k, i ) ans = 1 2 5 8

9 years ago | 1

| accepted

Answered
Accumulate values in time series
*Complaint:* Matlab doesn't offer an easy and intuitive way to _"Accumulate values in time series"_. Neither *|time series|* nor...

9 years ago | 0

Answered
Confusing questions on cells
# *|cell{[1 3:7]}|* creates a <uk.mathworks.com/help/matlab/matlab_prog/comma-separated-lists.html Comma-Separated Lists>, whi...

9 years ago | 0

Answered
Efficient way of reading cell arrays
I continue where we left in your last question. I assume * There are many data-files in one folder * The names of the...

9 years ago | 1

| accepted

Answered
regexprep $ and look-behind -- bug or expected ?
Expected, it has something to do with "$" not matching "one or more" characters in the string. This works regexprep( YourCe...

9 years ago | 2

| accepted

Answered
How do I select every nth number of trials and put them in a separate column?
Try this >> [ B, S ] = cssm1() B = [ 6x2 double] [3x2 double] [6x2 double] [3x2 double] [11x2...

9 years ago | 2

Solved


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

9 years ago

Solved


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

9 years ago

Solved


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

9 years ago

Solved


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

9 years ago

Solved


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

9 years ago

Solved


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

9 years ago

Solved


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

9 years ago

Solved


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

9 years ago

Solved


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

9 years ago

Solved


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

9 years ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

9 years ago

Question


How to implement isClassdef(filespec), isFunction(filespec) and isScript(filespec)?
I'm trying to implement isClassdef(filespec) isFunction(filespec) isScript(filespec) which take full filespecs...

9 years ago | 1 answer | 1

1

answer

Answered
How do I parse this complex text file with textscan?
Assumptions Speed is important - "any ideas on faster method?" The text file fits in memory - "The entire file is about 23 MB....

9 years ago | 2

| accepted

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

9 years ago

Question


How to include multiple "html-folders" in a submission to the File Exchange?
<http://uk.mathworks.com/matlabcentral/fileexchange/help_mfiles The documentation says:> How do I submit Published MATLAB ...

9 years ago | 0 answers | 0

0

answers

Load more