Respondida
switching x and y axes
concentrationfile=port_conc'; for i=1:NumTimeSteps, plot(concentrationfile(:,i)) ... The above plots e...

casi 10 años hace | 0

Respondida
how to export datetime time series to excel
doc exceltime xlswrite('yourfile.xls',exceltime(yourdatetimearray))

casi 10 años hace | 1

Respondida
Variable DivisionCount is not an integer datatype?
All variables are by default type _double_ in Matlab unless you make them something else; simple assignment won't do it, even if...

casi 10 años hace | 0

Respondida
What does patch = imJ(j : (j+patchSize-1) , i:(i+patchSize-1), :) means?
Read doc colon It's simply a subarray selection of a rectangular area ("patch") from the _imj_ array (undoubtedly an ima...

casi 10 años hace | 1

Respondida
Assign a certain element value if two array elements are equal
doc ismember *NB:* Be aware *ismember* is _exact_ equality and floating point rounding can wreak havoc on comparisons if ...

casi 10 años hace | 0

Respondida
How to process multiple matrices. Checking whether the elements of a matrix are within the specified range
Given you heed the advice in the comment so the data are in array _loads_ lo=207; hi=253; % set the limits...

casi 10 años hace | 2

| aceptada

Respondida
Width of bar in bar plotting is very high
I'd guess using the _'BarWidth'_ property will help--it's 0.8 by default, decrease that value for narrower bar widths.

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 1

| aceptada

Respondida
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...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 2

| aceptada

Respondida
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);...

casi 10 años hace | 0

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

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 1

| aceptada

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

casi 10 años hace | 0

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

casi 10 años hace | 0

| aceptada

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

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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,...

casi 10 años hace | 0

| aceptada

Respondida
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....

casi 10 años hace | 1

Respondida
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)...

casi 10 años hace | 1

| aceptada

Respondida
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...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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 = ...

casi 10 años hace | 1

| aceptada

Respondida
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...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

| aceptada

Respondida
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')...

casi 10 años hace | 3

| aceptada

Respondida
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...

casi 10 años hace | 0

| aceptada

Respondida
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...

casi 10 años hace | 1

Cargar más