Answered
How to find mode between two columns?
MATL [u,~,c] = unique(a,'rows'); [~,ix]=max(accumarray(c,1)); mdrows=u(ix,:); Encapsulate in function for general use. ...

13 years ago | 1

| accepted

Answered
I have a cellArray data and I extracted the first column of this cellArray. In another function when I call this data with global this data looks empty.
I see no GLOBAL in pushbutton1_Callback where out1 is defined. And, of course, even if there were, it has to have been executed...

13 years ago | 0

Answered
Automate mass open and process: string issue
See the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F> There's also a discussion/examples...

13 years ago | 0

| accepted

Answered
How to add leading zeros to a number in Hex format?
MATL >> bin2hex=@(x) dec2hex(bin2dec(x),length(x)/4) bin2hex = @(x)dec2hex(bin2dec(x),length(x)/4) >> bin2hex=@(x) de...

13 years ago | 0

Answered
Contiguous Number Checking and Verification
Given the input a, the first case of returning a logical array of groups that are/aren't contiguous... MATL >> [u,~,c] = u...

13 years ago | 0

Answered
How do you display calculated values in uitable without using set(handles.uitable,'data',value)?
MATL >> help uitable uitable creates a two dimensional graphic table component. uitable creates a table component usi...

13 years ago | 0

Answered
Is there a way to find the 'mode' of a histogram?
Seems to me would be approximated as [n,c]=hist3(....; [mx,ix]=max(n); % magnitude of most frequent bin location wo...

13 years ago | 2

Answered
How to aggregate data and calculate its standard deviation
I'll presume you have two vectors d and t; if so you can make a matrix as MATl >> m = [d t] m = 1 220 1 ...

13 years ago | 0

Answered
Why does plotyy work when I use area and bar graphs but not when I use line and bar graphs?
I simplified your case somewhat for diagnostic purposes. The following snippet draws the essence of your original... MATL ...

13 years ago | 0

Answered
How can I extract time series data from cell matrix and put all the data together in one matrix with corresponding date and fund ID? See Example here
OK, I recast as a function and tested so for a single shorter reporting I'll post it as a new answer even though is same algorit...

13 years ago | 0

Answered
How can I extract time series data from cell matrix and put all the data together in one matrix with corresponding date and fund ID? See Example here
CORRECTION -- THE ISMEMBER search wasn't right in initial, sorry. The following corrected version produces the desired results....

13 years ago | 0

Answered
How can I sort the output matrix according to the prescribed order in a column?
Presuming you have (or can generate) the desired order vector, then it's pretty much trivial--just find where they're located in...

13 years ago | 0

Answered
How to separate first 8 digits in binary format and convert them to the hex?
Enter the value as a string and then convert. First below does the endian swap directly; if want to do this way write a little...

13 years ago | 1

| accepted

Answered
Importing file with text and numbers
OK, I don't have time to work thru a clever way at the moment but the following scans your sample file ok... MATL fid=fope...

13 years ago | 0

| accepted

Answered
how to find minimum time format for each row of a cell array?
Make up some short sample data...including an empty cell Matl >> tt{:} ans = '00:00:21' ans = '13:12:10' ...

13 years ago | 0

Answered
Setting and fixing axes and figure handle in plot3
_In the for loop, the axes limit will change for each iteration depending on the size of the data in plot3 function, but I would...

13 years ago | 0

Answered
Program for the equation
Presuming you've loaded the spreadsheet into two variables f and ampl, MATL MF=sum(ampl.*f)/sum(f); If it's as an array...

13 years ago | 0

Answered
Setting and fixing axes and figure handle in plot3
Mat h.figure1=figure('Name','Shimmer 1'); h.axes=axes('Linewidth',[4],'DataAspectRatio',[1 1 1], ... 'XGrid',...

13 years ago | 1

Answered
special kind of sort
OK, here's a simple demonstration of what had in mind that works for the sample dataset -- I've not tested it on anything more c...

13 years ago | 0

Answered
How long have you been using matlab? tell us your story
Indeed...some have been very handy in an off-list mentoring situation last month w/ a Indian student studying in Sweden while wo...

13 years ago | 0

Answered
How long have you been using matlab? tell us your story
It's a long time coming, but... :) Hadn't seen this owing to not having switched from cs-sm. Is interesting to hear the stor...

13 years ago | 1

Answered
How can I automatically plot graphs two by two of the same color?
One way... M x = 0:1:10; color={'b';'g';'r';'c';'m';'y';'k'}; for a=1:10; y = a*x; c=color{fix((a+1)/2)}; ...

13 years ago | 0

Answered
how to make the data collection result in a file?
M save datafile data1 will write a .mat file DATAFILE.MAT w/ the desired array. use LOAD to retrieve it. M doc save...

13 years ago | 0

| accepted

Answered
Convert 10 minute average to hourly
Reinsert the missing points w/ NaN and if have Statistics toolbox use NANMEAN(); otherwise it's not difficult to filter them out...

13 years ago | 0

Answered
special kind of sort
One possible solution... >> sortrows(a,[2,3]) ans = 'r1' 'NaN' 'br1_0_40' 'r4' 'NaN' ...

13 years ago | 0

Answered
fprintf Formatting Issue - Padding FLOATs with '0'
fprintf(1,['Mode %03d ... ' at ArcLength %04.3f m in Direction %1d\r\n'],... I get an output like this: ...

13 years ago | 1

| accepted

Answered
How to recognize repetition in data for a certain period of time?
Use diff() on the responses and look for zeros in consecutive locations. How to determine the time is dependent on how it is ...

13 years ago | 0

Answered
Bar chart with two y-axis and different scales
ha=plotyy(X1,Y1,X2,Y2,@bar,@bar) to tell plotyy to use bar chart for each axis w/ the data as given in the two sets of X,Y pa...

13 years ago | 0

Answered
How to Speed Up matlab for cycle?
OK, since the same thing is done under both branches of the if...else construct, one can replace the loop by logical addressin...

13 years ago | 0

Answered
How to Speed Up matlab for cycle?
A) ix=([logical(0);(diff(A(1:N))~=0)]); L(find(id))=A(id); locais=L(2:end); I've got a meeting...gotta' run for no...

13 years ago | 0

| accepted

Load more