Answered
read pre-formated text file
>> s='person01_boxing_d1 frames 1-95, 96-185, 186-245, 246-360'; >> fmt=['person%2d%sd%d frames ' repmat('%d-%d',1,4)]; >> ...

12 years ago | 0

| accepted

Answered
Errors in using string and vector together
>> disp([char(str) num2str(arr,' %d')]) A 1 B 2 C 3 >> *disp* only takes a single argument and have to dereference the...

12 years ago | 1

Answered
Scatter plot with different marker types
The _scattergroup_ property name is _marker_ See doc scatter for the details...

12 years ago | 0

| accepted

Answered
How can I subtract columns for each row by using a for loop
nk=nchoosek(1:size(x,2),2); dx=zeros(size(x,1),size(nk,1)); for i=1:size(nk,1) dx=x(:,nk(i,2))-x(:,nk(i,1)); end...

12 years ago | 0

| accepted

Answered
Ideas on how to delete values in vector and later put them back into their right places?!
It's reasonably easily doable by simply keeping track from whence the values came when you removed them but I'd suggest "don...

12 years ago | 1

Answered
set function doesn't work
You've got a *set* instead of a *get*. I don't know about the operation, per se, but use h=get(gcf,'keypressfcn','get(gc...

12 years ago | 0

Answered
Search rows of a matrix on another and read data respectively.
[~,ia]=intersect(A(:,1:2),B,'rows','stable'); % locations B=[B A(ia,3:end)]; *ADDENDUM* OK, I didn't look at the act...

12 years ago | 1

Answered
number to variables in matrix
Sorry, I can't interpret what you're after...are the Xn intended to become the factors in _U_, respectively? If that's so, then...

12 years ago | 0

Answered
Scatter Plot with Error Bars
You don't really indicate what you _do_ want and with no info on what the various variables are, but just guessing looks like yo...

12 years ago | 2

Answered
Selecting values from a vector
One way == Encase the iterative section in another function; then invoke that function using *arrayfun* to apply to each elemen...

12 years ago | 1

Answered
Delet zeros after final number
A=A(1:find(A,1,'last'));

12 years ago | 2

| accepted

Answered
Undefined function or variable
function u= elj(r,sigma,epsilon,beta,Lb,q1,q2) ... if ra <= 1.12246*sigma uw = uj+us; else ua=exp(-beta*(uw + cb)...

12 years ago | 1

Answered
how to read CSV file in matlab while ignoring the first line
What is wrong is you didn't specify the delimiter... dat=textscan(fid,'%f%f%f%f%f','Headerlines',1,'delimiter',','); F...

12 years ago | 2

Answered
fscanf - In an assignment A(I) = B, the number of elements in B and I must be the same.
x(i) = fscanf(ard, '%*s %d'); _x(i)_ is a single entry; apparently there are either no returned values or more than one...

12 years ago | 1

Answered
Why matlab is outputting test values even though everything is suppressed?
_...keep getting outputs that say test equals a number and I can't figure out why._ Because while you _think_ you've got all ...

12 years ago | 1

Answered
Search excel file for a specific time interval and store that data as a variable
Input the gui dates in whatever format you want as the user interface. To find the data in the spreadsheet and make the plots a...

12 years ago | 1

Answered
Error using plot. Vectors must be the same lengths.
_...The variables are all the same lengths..._ But, Matlab says they're not and Matlab doesn't lie (and rarely is such a case...

12 years ago | 1

Answered
Return textual stringdata without primes
The "primes" (actually single quotes) are a figment of Matlab's display of cell strings--they aren't really a portion of the str...

12 years ago | 1

Answered
2d array in matlab
Matlab does silent automagic allocation -- just assign z=zeros(2); % is a 2x2 array See "Getting Started" section in the ...

12 years ago | 1

Answered
how to read several ascii text file in a folder and avoid the header in each text file
Start w/ the FAQ... <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F> I strongly recommend the *...

12 years ago | 1

Answered
how to convert .mat file .txt file
load 'yourfile.mat'; Now write the variable(s) contained in the file in whatever format data you need with *fprintf*

12 years ago | 1

Answered
How to extract column data from a csv file in vectors
Don't say which columns are of interest, but you'll have much more success if you use format string for the types of data by col...

12 years ago | 1

Answered
How can i change the range of the axis X
doc xlim doc axes % then axes properties, particularly 'xtick' doc set

12 years ago | 1

Question


Peculiar behavior of lookfor
Given the following function definition function is=isleapyr(yr) % returns T for input date being a leapyear is=(d...

12 years ago | 1 answer | 1

1

answer

Answered
How to take monthly of time series using loop I am having data form each month( having 30/31) data values
This question was just asked (again) and answered at <http://www.mathworks.com/matlabcentral/answers/155179-calculate-the-acc...

12 years ago | 1

Answered
calculate the accumulation of a variable over time within a loop?
_... to calculate 3-month sums..._ There it's simpler to use another Matlab "trick" of recognizing and utilizing internal sto...

12 years ago | 2

Answered
acces indexes of Multidimensional arrays while using index of elements in a vector?
_...the script ... only write[s] to the index (:,:,1)_ Yes, because your index-computing expression only addresses a plane in...

12 years ago | 1

| accepted

Answered
Using MATLAB to create a random N,1 array of zeros and ones.
X(randperm(3652,91))=1; % fill a random permutation of 91 locations out of 3652

12 years ago | 2

Answered
Figure legend editing, multiple lines and adding specific text
_VERY_ crude beginning, but the idea as I understand what you're looking for can be achieved from some clever (or not so clever,...

12 years ago | 2

Load more