Answered
Want to add second to a time stamp
"Classic" date numbers... >> datestr(addtodate(datenum('10:12:49','HH:MM:SS'),526,'second'),'HH:MM:SS') ans = 10:21:35 >...

11 years ago | 0

| accepted

Answered
Plot function generates markers but not lines
Wrong way to go about it...using the explicit design matrix and direct inversion is poor numerically...instead plot(WS(:,1)...

11 years ago | 0

| accepted

Answered
Annotate the lines in plot with many line
doc text See example there and the "See Also" for *annotation* for more exotics...

11 years ago | 0

| accepted

Answered
Why is my legend for the calculated bode plot appearing twice?
OK, I think I see where the problem lies -- TMW has fouled up things again with the inconsistency they've introduced with object...

11 years ago | 0

Answered
Creating vectors stings of letters such as names
It already _is_ a vector-- >> s='qwerty'; >> whos s Name Size Bytes Class Attributes s...

11 years ago | 1

| accepted

Answered
separating day month year from string
[d,mo,yr]=textread('yourfile','%2d.%2d.%4d'); if were only that column. For more columns, use the proper format string for...

11 years ago | 0

| accepted

Answered
bar plot offset from left/right at small sizes
xlim([0.5 4.5]) Salt limits to suit based on number of bars and fractional spacing that pleases...

11 years ago | 0

| accepted

Answered
xlswrite in different columns
In the manner as written specifically, no, but there's a much simpler way -- just *reshape* the array and write it in a shape th...

11 years ago | 0

Answered
Problem with plotyy for standard deviation on my plot
Well you didn't tell what you got for an error but for starters is missing the x value for the second plot with an empty ar...

11 years ago | 0

Answered
How do you print a cell matrix of different data types into a txt file
A major hassle it is, indeed...to use *fprintf* you've got to write a specific formatting string for every line so in an irregul...

11 years ago | 0

Answered
Attempted to access f(97); index out of bounds because numel(f)=96.
for i=length(f) The above is simply i=length(f); there will be only one iteration performed. Since i==length(f), ...

11 years ago | 0

Answered
i wnat change 'axes' positon please help me
figure hF(1)=subplot(2,2,1); hF(2)=subplot(2,2,3); doc subplot % for details... You can adjust the default posi...

11 years ago | 0

Answered
Finding and plotting evenly-spaced points along a vector
Alternate way given the two end points [x,y]-- xy=[linspace(x(1),x(2),12).' linspace(y(1),y(2),12).']; returns the poin...

11 years ago | 1

Answered
Similar Goal Seeker function like on Excel in Matlab?
*fsolve* is your friend... Recast your script into a function of T and then create an anonymous function with it and the targ...

11 years ago | 1

Answered
boxplot labels from numbers and strings
_"[1,'b']"_ doesn't work outside of *boxplot*, either; you can't juxtapose character and numeric data in a vector. Use cell ...

11 years ago | 0

Answered
Why is my legend for the calculated bode plot appearing twice?
... semilogx(butterWorthLP(1:3:end), butterWorthLP(2:3:end), 'b','linewidth',2) hold on; h = bodeplot(sys2,opts,'b-.'...

11 years ago | 0

| accepted

Answered
Coefficient of determination from circular fit to (x,y) data.
If the contributors of the FEx submittal(s) you used didn't incorporate such, here's your opportunity to contribute! :) It'd...

11 years ago | 0

Answered
Sorting 2D matrix
>> sortrows(A.',2).' ans = 23.0000 18.0000 26.0000 20.0000 6.0000 0.9988 1.4302 2.7403 2.9512 3...

11 years ago | 0

| accepted

Answered
How do I manipulate a column in a data file ??
If it is an ASCII data file, then read the file, do the computation(s) on the column in question and rewrite it. If it were a...

11 years ago | 0

Answered
time delay estimation algorithm
<https://www.google.com/search?q=time+delay+estimation+matlab&ie=utf-8&oe=utf-8>

11 years ago | 0

Answered
Subscripted assignment dimension mismatch. error in for loop
Unless the difference between the indices is the same for each iteration, you'll "go boom" the first time the length is differen...

11 years ago | 0

Answered
How to get details from a plot?
Alternately to Walter's solution based on interpolation to a particular resolution, solve directly for the locations wanted rath...

11 years ago | 0

Answered
Drawing a straight line to a linear part of curve
Looks like piecewise regression to the rescue again...it has been the subject of some of my previous postings, one quite recent....

11 years ago | 0

| accepted

Answered
define the 1/K strategy
wt=bsxfun(@rdivide,B>0,sum(B>0,2));

11 years ago | 0

Answered
How to perform simple interpolation of excel data on matlab?
x=xlsread('yourExcelFile'); idx=isnan(x(:,2)); x(idx,2)=interp1(x(~idx,1),x(~idx,2),x(idx,1)); doc xlsread doc i...

11 years ago | 0

Answered
format data for floating to integer to ascii
From help save ... '-ascii' 8-digit ASCII format. ... For ASCII file format...

11 years ago | 0

Answered
How to get find() results as a matrix?
Yes, if you wrap the *find* call inside *ind2sub*-- ijNONZERO = ind2sub(find(I),size(I)); But, you really don't need the...

11 years ago | 1

| accepted

Answered
How can I use sprintf and xlswrite to insert data into a specific cell?
start = 1; ... for i = start:finish my_cell = sprintf('K%d',i); ... The superfluous *num2str* aside (as sho...

11 years ago | 0

| accepted

Answered
How to find the indices of a point on a curve
If you have the curve as computed points, see doc interp1 Switch the normal X,Y meanings to interpolate with Y as the in...

11 years ago | 0

Answered
hi every body !! my question is how to get the position of the similar elements in same matrix??
Basic idea is >> find(M(1,:)==M(2,:)) ans = 1 2 4 5 >> Apply above for each row pairwise; note you'...

11 years ago | 0

| accepted

Load more