Answered
Subplot/Figure with parameters
How about sotoo-- for i=1:3,hAx(i)=subplot(2,3,i);end % create the 2x3 axes set(hAx(1),'xtic...

11 years ago | 0

| accepted

Answered
change x axis in a plot
Convert the times to date numbers and plot against them (or compute from the sampling time the locations in the vector that are ...

11 years ago | 0

Answered
plotting the following in matlab impossible?
dn=datenum(Rodtime); % convert to date num's plot(dn,RPeakAmplitude1) datetick('x') Adjust x limits, tick spacing as ...

11 years ago | 0

Answered
Reading excel data from file and using datetick
Dates were read as numeric Excel dates; not as string values. See <http://www.mathworks.com/help/matlab/ref/exceltime.html ex...

11 years ago | 0

| accepted

Answered
Time series plot: put YYYYMM on x-axis?
>> dn=datenum(1926,7+[0:(2014-1926)*12+5].',1); >> datestr([dn(1));dn(end)]) ans = 01-Jul-1926 01-Dec-2014 >> y=rand(size...

11 years ago | 0

| accepted

Answered
Error using fwrite Invalid file identifier. Use fopen to generate a valid file identifier- eventhough fid is positive
... filename=['Base_',num2str(k),'.yml']; fidw= fopen(filename,'w') for i = 1:Length fidw= fopen(filename,'w') ...

11 years ago | 0

| accepted

Answered
YTickLabel positioning - labels between ticks
Use *text* instead of tick labels for this... hAx=axes; set(hAx,'ylim',[0 3],'ytick',[0:3],'yticklabel',[]) text(-0.0...

11 years ago | 2

Answered
Read multiple text files and store data
my_files = dir('*.txt'); ... for k = 3:N_files _"(k start from 3 because, when I read the files, the first two are "....

11 years ago | 0

Answered
I am trying to sort the output data, I need a help to write data into excel file using for loop.
See the manner in which the sequential file names are generated in <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequenc...

11 years ago | 0

| accepted

Answered
How to use fscanf in matlab to read any element of a matrix?
To not read the third column (which I presume is the answer to Stephen's logical question) you've got to "tell" the i/o routines...

11 years ago | 1

| accepted

Answered
Need to set a custom tick label - Bar chart - Numeric values for 'xticklabel' but last tick needs to be alpha characters example - 1,2,3,4,5,6,OAL - How to do
set(gca,'xticklabel',[num2str([1:6].'); 'OAL']) NB: are column vector. *ERRATUM* Account for differing string lengths...

11 years ago | 0

Answered
Using textscan wisely, different data type
Presuming the file is regular in format, something on the lines of fmt=[repmat('%f',1,7) '*%s ;']; % format string fid=...

11 years ago | 0

Answered
"xlswrite" Generates A Negative Number for This Line
It's a fignewton of how Excel interprets the string; enclosed in the parentheses it apparently tries to convert to a numeric val...

11 years ago | 0

Answered
Perform Operation Only on Specified Rows.
Warning: air code; untested... k=0; % row counter (or compute on fly from i,j, your choice...) L=size(A,1); for i = ...

11 years ago | 0

Answered
What is the correct file extension for function "importdata" working properly?
If this is indeed reproducible and can be absolutely confirmed to be the file name extension only, it's a bug. Submit a bug rep...

11 years ago | 0

Answered
how can plot a matix?
Plot what against what? Who's independent variable, who's dependent? Simply against observation number just use plot(1:le...

11 years ago | 0

| accepted

Answered
How to adjust plot scaling/divisions
ylim([500 1000]) doc ylim % for details _"...the intermediate values still don't show"_ Then set ticks where you wa...

11 years ago | 2

| accepted

Answered
Multiple plots using a method on single axis?
Sure, just set *hold on* for the figure after the first plot... NB: To cycle colors/linestyles you'll have to increment and ...

11 years ago | 0

| accepted

Answered
how to adjust graph labels ?
yt=[0:1000:max(cell2mat(a(:,2)))].'; set(gca,'YTick',yt,'yticklabel',num2str(yt,'%d')) What does _"how to fit the x labe...

11 years ago | 0

Answered
How do I take create a vector from the result of a random function every time it goes through the loop?
First part -- nRow=300; nCol=2000; % define problem size A(nRow,nCol)=0; ...

11 years ago | 0

Answered
Append a file, Error using save, File may be corrupt
As the English definition implies, "append" means there's got to be something already there to append _to_. While computer-lang...

11 years ago | 1

| accepted

Answered
Using fscanf to capture a mixed data string.
OK, you don't want to match the strings, then; characters in a format string other than those with specific formatting meaning a...

11 years ago | 0

| accepted

Answered
How to import a txt file with the format 'Di 02.07.1991 1718,02'
fmt='%s %2d.%2d.%4d %4d,%2'; Build the time value as the next_to_last_column_value*100+last_column_value Alternatively, ...

11 years ago | 0

Answered
How to check if a line contains only numbers?
Probably regular expressions are the clever way here, but my proficiency is such I always have to go dig around too long to get ...

11 years ago | 1

Answered
plotyy line width and color - with multiple lines
The line properties are associated with the line handles, not those of the parent object. In *plotyy*, they are returned in the...

11 years ago | 0

Answered
Choose parameters which minimize a function
Not sure I follow the intend exactly, but if I understand you wish to pick the subset of (8) values from each of two larger sets...

11 years ago | 0

Answered
Convert text file data into a 3D matrix
So I presume you intend the various subsets as the planes of the array? There are groups of 6x7 floats followed by two lines ...

11 years ago | 0

Answered
Plotyy problem, curves incomplete
Would need the data to go along with the m-file to see for certain but I note that you have one *xlim* call with no axes specifi...

11 years ago | 0

| accepted

Answered
Hi, i want to read values fron excle file my code, but when i use format short it reads 1.6 as 2.0 so no.
It has no bearing on computations nor internal representation nor the results of reading an Excel spreadsheet. format Set o...

11 years ago | 0

Answered
How to insert a blank column in the matrix
inPos=4; % location at which to insert Nz=1; % number of zeros to insert x=[x(1:inPos-1) repmat(0,1,N) x(nPos:end];...

11 years ago | 1

| accepted

Load more