回答済み
offset of ticks labels
Not w/o using *text* instead of letting the axis tick property control them, no. First fix the formatting issue with tick lab...

9年以上 前 | 1

| 採用済み

回答済み
I want to have two Y axis with the same x axis , one of the Y axis is the histogram of the data and the other is prob plot of the same data.?
See <http://www.mathworks.com/help/stats/histfit.html histfit> Ah, so...indeed that is pdf only...try something like-- y...

9年以上 前 | 0

回答済み
How to find most frequent value from a Matrix column?
>> u=unique(A); % find the unique values in vectr >> [n,b]=histc(A,u); % bin on those and count nu...

9年以上 前 | 2

| 採用済み

回答済み
subtracting a particular value until that the result becomes negative
>> A =[1:5 4 2 1 1 1 3]; >> ix=6; % initial location >> v=8; % external initial value >> dA=v-A(ix);...

9年以上 前 | 0

回答済み
import many txt files
May find following of interest... <http://www.mathworks.com/matlabcentral/fileexchange/9723-filefun--apply-a-function-to-files ...

9年以上 前 | 0

回答済み
Keep only certain rows based in three column values
For the data first posted-- ix=find([mod(wdir(:,4),3)==0 & wdir(:,5)==0]).' ix = 1 19 37 55 73 91 1...

9年以上 前 | 1

| 採用済み

回答済み
Averaging data every three hours
Use Matlab internal storage order to do this over regularly-fixed data... >> wdir=importdata('luis.txt'); % the data arra...

9年以上 前 | 0

回答済み
Select subset of data
dataB=dataA(ismember(freqA,freqB)); If the frequencies are floating-point values, above will often fail owing to FP roundin...

9年以上 前 | 0

| 採用済み

回答済み
Plotting values with start time and timestep
t0=3.15E-5; % origin dt=2E-9; % timestep N=length(var); % number obse...

9年以上 前 | 0

回答済み
Scatter plot - different colour marker for night and day
Presuming you converted to *datetime* array for the times, then Well, here, let's just build a sample... >> t=datetime(2...

9年以上 前 | 0

回答済み
changing the scaling in the plot permenantly
set(gca,'xtick',[0:10]) programmatically isn't _that_ bad; could wrap into a user function if doing this a lot. If you mak...

9年以上 前 | 0

回答済み
How can I plot 2D plot from three matrix?
M=cat(3,A,B,C); % build 3D array of all of individuals to manipulate as one M=reshape(permute(M,[3,2,...

9年以上 前 | 0

| 採用済み

回答済み
How can I plot 2 different matrix with different color at the same figure via scatter function?
Well, to have something like the above figure you'd need two sets of x-y data, not just one list of two columns as you indicate....

9年以上 前 | 1

回答済み
How to find same nearby values and sort them
Given _x_ is the third data column of [0 1...] >> dx=diff(x)==0; % logical vector where difference is 0; ergo x(i+1)==x(i)...

9年以上 前 | 1

| 採用済み

回答済み
Obtaining a maximum value from the third column of an array which is in a cell
I don't have Image Processing TB so don't have access to *|regionprops|* to exactly know how it returns its outputs but what you...

9年以上 前 | 0

回答済み
I need to plot a bar graph with two y axes with different scales.
See doc plotyy hAx=plotyy(X1,Y1,X2,Y2,@bar,@bar); % put bar plot on two axes. The "trick" is to fill the columns o...

9年以上 前 | 0

回答済み
Three input statements in 'and function'
Let's use operators instead of functions and associating parentheses to make easier to keep things straight.. I almost always...

9年以上 前 | 0

回答済み
How do I create a function where output S has the rows as input N
TMW already wrote the function for you... >> N =[1 2 3 4;4 5 6 7;8 9 10 11]; >> S=mean(N,2) S = ...

9年以上 前 | 1

| 採用済み

回答済み
Difference between consecutive cells?
Start with doc ismembertol If you try dx=diff(x)==0; you'll find not many actually are identically 0 but instea...

9年以上 前 | 0

回答済み
How to Call the Name of a Loaded File?
"From A", you can't; the data stored _in_ a .mat file are totally independent of the (root) name given the file when it was crea...

9年以上 前 | 0

| 採用済み

回答済み
Bar Chart Log Axis
If you mean to still bin on linear range want to display x on a log scale, just use hBar=bar(xb,counts,'r','EdgeColor','r')...

9年以上 前 | 3

| 採用済み

回答済み
hi guys , i want to read a text file line by line and remove the lines which have NA and the duplicated columns
Well, 'NA' is easy, not sure what defines the repeated columns; not enough time at present to try to parse that input file to fi...

9年以上 前 | 0

| 採用済み

回答済み
Can I do mean of groups?
Besides John's way of having a corollary variable of timestamps to use as grouping variable, assuming the dataset is complete an...

9年以上 前 | 1

回答済み
Large format spec statement in textscan
fmt=repmat('%d',1,1025); data=textscan(fid,fmt,... For the second, use the option _N_ multiplier to control the number o...

9年以上 前 | 0

回答済み
How to add error bars to a semilogy plot?
hAx=axes; % new axes; save handle errorbar(A,B,C,'o') % plot as errorbar hAx.XScale='log' ...

9年以上 前 | 1

回答済み
Importing Data from Excel
d=dir('*.xlsx'); % return directory list of all Excel files x=[]; for i=1:length(d) x=[x;xlsread(d(i).name,'B:B');...

9年以上 前 | 0

| 採用済み

回答済み
Decimals control to the writetable to txt!
More than likely this is a case of display vis a vis internal storage; in general floating point values can't be stored precisel...

9年以上 前 | 1

回答済み
Help! My first for-loop plot
_"I can't get the line to show! Where did it go?"_ It didn't "go" anywhere, you never actually plotted it--in if sin(i...

9年以上 前 | 0

| 採用済み

回答済み
1-D interpolation along specified dimension
Not sure who's the independent _x_ value but seems like the vectorized form should work xout=interp1(x,data.',xq); where...

9年以上 前 | 1

| 採用済み

回答済み
How can I convert 8 digit "20171203" date to proper format?
Use the new(ish) _'%D'_ format specifier with *textscan*-- >> d=20171203; >> dt=textscan(num2str(d),'%{YYYYMMdd}D') dt ...

9年以上 前 | 1

さらに読み込む