Answered
Interpolating a table with missing values
A better experiment design could have been thought out, but... xx=[0:0.0625:0.625 0.65]; yy=[xx(2:end) 0.675]; x=[zer...

10 years ago | 0

Answered
Xlsread input arguments?
Sure, write the translation from whatever _x,y_ are to the character form...it's not clear what they represent, however, but if ...

10 years ago | 0

| accepted

Answered
How to label Xtick with assigned years?
Copying your X array, I find >> Nyr=length(X) Nyr = 51 instead of 52...minor point perhaps you missed a datapoint ...

10 years ago | 0

| accepted

Answered
Extracting data from a .txt file
>> c=textread('data.txt','%s','delimiter','\n','whitespace','','headerlines',2); >> ix=~cellfun(@isempty,strfind(c,'Animal ...

10 years ago | 0

Answered
export to csv without scientific notation
As Star says, "not a Matlab question" but if is a FEX submission it probably suffers from similar limitation as does *csvwrite* ...

10 years ago | 0

Answered
How to shift xaxis location to origin (0,0) ?
OK, got a minute now... hAx=axes; % a new axes plot(randn(10,1)) % put some data on it...

10 years ago | 1

| accepted

Answered
How can i generate month and year strings for Datetime vectors?
t = datetime(DateStrings,'InputFormat','dd/MMM/yyyy', ... 'Format','yyyyMM'); should do it (alt...

10 years ago | 0

Answered
How to shift xaxis location to origin (0,0) ?
Set 'YAxisLocation' to 'Origin' -- require HG2 R2014a(?) or later...

10 years ago | 0

Answered
I would like to convert a date in the format of, for e.g., 02 September 2004, to a datenumber. But this format is not a standard Matlab format. Does anyone know how I could do this please?
Read the doc and use the named parameter _'InputFormat'_ t=datetime(DateStrings,'InputFormat',infmt); % interpret DateStrin...

10 years ago | 0

| accepted

Answered
I need to find the location of any variable inside the cell array VE0 .. for example CE1 ? want to return 3 the location of CE1 inside VE0
Outside the fact there _is_ only one copy of _CE1_ inside _VE0_, the information on the variable which contained the contents of...

10 years ago | 0

Answered
How to combine two plots with different y-axis, but same x-axis
What's wrong with *plotyy*? Only "issue" at all I see is that you'll either have to label the x-axis tick labels with the yea...

10 years ago | 0

Answered
Combining columns of an excel sheet after importing it into Matlab
jan12Dst=reshape(jan12.',[],1); % column vector by row Interchange the [],1 arguments for a resulting row vector.

10 years ago | 0

Answered
Put axes in center of image?
Read the doc and the examples... x=[-32 32]; y=x; imagesc(x,y,img,clims);

10 years ago | 0

| accepted

Answered
How to skip specific amount of lines to extract data until a specific string is reached.
A _short_ sample of the data format itself would help with details, but basically if the data are regular numeric data you can s...

10 years ago | 0

Answered
obtain x labels on both the top and bottom?
Yeah, add a second x-axis on the top and *linkaxes* the two handles. See the documentation on using multiple x- and y- axes for...

10 years ago | 0

| accepted

Answered
I'm having trouble running my script
Matlab doesn't have explicit typing; numeric things are *double* by default, you specify more exotic data structures such as cel...

10 years ago | 0

Answered
for loop with least square curve fit matlab
yes

10 years ago | 1

| accepted

Answered
Strmatch with multiple inputs possible?
Not directly that I can think of, no...can get moderately close with *cellfun* although it needs that the target array be static...

10 years ago | 1

| accepted

Answered
Import data from Excel, based on the cell content
Wrong approach -- read the data, _then_ eliminate that which isn't wanted. x=xlsread('yourfile.xls'); x=x(x~=5); If y...

10 years ago | 0

| accepted

Answered
Run length of consecutive integers in array
ix=find(diff(v)~=1); % indices rl=diff([0; ix]); % runlength

10 years ago | 4

Answered
Reading a text file and rows with data
Well, since the file was malformed after all, here's how to clean it up and create a version which can then be read... ...

10 years ago | 0

| accepted

Answered
Reading a text file and rows with data
Oh, one thing I noted also when checking on the delimiter; the EOL marker is '\r'; wonder what would happen if skip for it expli...

10 years ago | 0

Answered
bar graph : How to show each bar with different base value ?
Apparently you've got an earlier release than R2014b, maybe? The ".dot" notation for properties wasn't implemented prior, use *...

10 years ago | 0

Answered
Extract date and time information and calculate time interval
Read doc fopen fileID= fopen('Braye_Qdata.txt'); _"returns an integer file identifier..."_, ergo [nb_lines, nb_c...

10 years ago | 0

Answered
Error using floor() and ceil() for specific values between o and 1
_" just trying to figure out the index of the nearest value inside the matrix (superior and inferior)."_ Then look for that d...

10 years ago | 0

Answered
My data consists of different years(1982, 1987, 1992, 1997 and 2002) which are not in the sequence, and each of the years have different prices and quantities. How can I compute the total (sum and mean) price and quantity of each year.
Presuming a recent release, use the *table* type and grouping variables... <http://www.mathworks.com/help/matlab/matlab_prog/...

10 years ago | 0

| accepted

Answered
plotting the power spectrum density
There's a good example at doc fft

10 years ago | 0

Answered
Error bars added to column plot instead of regular line plot, and stacked 2x2
Would be worth a search on File Exchange to see if somebody has submitted a function, but-- It's somewhat of a pit(proverbial...

10 years ago | 1

| accepted

Answered
how to find a common part of the strings?
The most trivial is that the part thru the second underscore is the same so use that fact... ix=strfind(str,'_'); % t...

10 years ago | 0

Answered
How to read .raw files of unknown number of rows and 9 columns
fid=fopen(... while ~feof(fid) v=cell2mat(textscan(fid,'%f',9,'collectoutput',1)); % do whatever with _v_ here ...

10 years ago | 1

| accepted

Load more