Answered
Reading specific range from multiple sheets in Excel
Use *xlsfinfo* to return the list of sheets in the workbook and iterate over the returned cellstr array.. excFile='myExcel....

10 years ago | 1

| accepted

Answered
Why am I getting a "Subscript indices must either be real positive integers or logicals" error?
'Cuz you wrote for i = 1:length(x) if ice(i) == 1 N(i)= N(i-1)* .880606541; and _ice(1)_ _is_ 1 so the RHS of th...

10 years ago | 0

| accepted

Answered
max and min values in an array
It's the colon operator that's your friend here... mnx=min(x(:)); % doc colon for details of the "magic" here...

10 years ago | 3

Answered
boxplot xticklabel overlapped with xlabel
OK, played some more and got the below... <</matlabcentral/answers/uploaded_files/65337/untitled.jpg>> This was created by...

10 years ago | 0

Answered
boxplot xticklabel overlapped with xlabel
Raise bottom of axes 'position' property if you insist on such large font sizes. Of course, must reduce height the same amount....

10 years ago | 0

Answered
Plotting data with min, max, mean value
See doc boxplot % for starters... *ADDENDUM* I admit I've never used Matlab *boxplot* in anger; let's see...[ponder,...

10 years ago | 1

| accepted

Answered
How to plot rows of two matrices in different colors without for loop
Matlab is column-major... plot(x.',y.') will treat each column as an observation automagically. Colors will cycle throu...

10 years ago | 0

| accepted

Answered
Dates like 12/31/65 interpreted as 12/31/2065
"Use the pivot, Luke!" >> datestr(datenum('12/31/65','mm/dd/yy')) ans = 31-Dec-2065 >> datestr(datenum('12/31/65','mm/dd...

10 years ago | 1

Answered
How can i find points intersecting x-axis on graph and show them on figure
Either doc find % nearest point (note to look for crossing, not zero) or doc interp1 % interpolated location if not e...

10 years ago | 0

Answered
how to use find to cell cell indexing
Because as your command line shows, grnd_truth_cell{:,1} is a comma-separated list. Enclose it in the [] to make an ar...

10 years ago | 2

| accepted

Answered
How to read char '00013' as 13 or '00717' as 717 ? How to skip zero pad ?
>> str2num('00013') ans = 13 >> Or any of the other ways to parse data; *sprintf* or any of the other i/o functions...

10 years ago | 0

Answered
plotyy: problem with ticks
set(ax,{'ylim'},{[minimum_left maximum_left];[minimum_right maximum_right]}) See doc set % for details on syntax for...

10 years ago | 0

Answered
Hi every one ,i wrote a simple code that ask the user for a number as input then convert it to binary and finally perform bitand to get final binary number , but i got an error !,my question is how to convert charactor to an Array or to double ?
Unfortunately, Matlab doesn't have a syntax to enter other base values than base 10 numerically; it appears you want _B_ to be a...

10 years ago | 0

| accepted

Answered
read excel files in form of a function
_"but I am missing something."_ function Testing = readfile(a) T = readtable('a','TreatAsEmpty','NA'); ... Ind...

10 years ago | 1

| accepted

Answered
Label bars of a histogram
set(gca, 'XTic',binranges) will use the bin values for ticks. It's not as trivial to label the bin ranges as tick labels a...

10 years ago | 1

| accepted

Answered
Plot and bar graphs with independent axis
Not too difficult, no... hAx(1)=axes('XAxisLocation','top',... 'YDir','reverse'); bar(rand(10,1)) ...

10 years ago | 1

Answered
I want 4 differnt histograms in one graph but in seprate columns. how can i do this.? they appear as in fig 1 but i want the data to be appear as in fig 2
Arrange the data by row for groups, column for variables...so 3x4 for Fig 2. <http://www.mathworks.com/help/matlab/ref/bar.ht...

10 years ago | 0

Answered
Error in show Semilogy
Well, the two vectors must not be the same length...to plot them against each other, they must be commensurate in size. Let's s...

10 years ago | 0

Answered
Datenum produces different values for the same date in different formats
Because the *datenum/datestr* month,day,year format string values are lower case, not upper. You converted the string represent...

10 years ago | 0

| accepted

Answered
Surface Plot Marker Edge Colour
Use hSF=plot(surfacefit,[C(:,Var_1), C(:,Var_2)],C(:,Var_3)); instead to get the handles of the objects created. One of...

10 years ago | 0

Answered
write 10 alphabets in one line
>> sprintf([repmat('%c',1,10) '\n'],'A':'Z') ans = ABCDEFGHIJ KLMNOPQRST UVWXYZ >> *ADDENDUM* Above return...

10 years ago | 0

Answered
max value every n interval
Got the right idea, just can be a little more parsimonious in the implementation... >> [mx,ix]=max(reshape([Data nan(1,mod(...

10 years ago | 1

| accepted

Answered
Function variable output name to be the same as input variable name + "_pos".mat
fname=[inputname(1) '_pos']; % doc inputname for details save(fname)

10 years ago | 0

Answered
How do I create density contours on a polar plot?
I was afraid that's what you were looking for -- there's nothing out-of-the-box in Matlab that'll do it. I see the following su...

10 years ago | 0

Answered
How can i compare two strings by their alphabetical order
>> 'a'-'b' ans = -1 >> may give you some ideas??? Or, instead of reinventing the wheel, <http://www.mathworks.co...

10 years ago | 0

Answered
Problem converting cell to string
Well, you've just got to work on writing the proper format string(s) to use when you need them...an example specifically for the...

10 years ago | 0

Answered
How to have labels stick to axis?
xlabel('X Label','rotation', 30) zlabel('Z Label','rotation',-30) Look at the _Text Properties_ section for details of...

10 years ago | 0

Answered
Why am I getting the 'Too many output arguments error'
*error* is a Matlab-supplied function which returns no outputs; hence trying to assign to a LHS fails. See doc error % fo...

10 years ago | 0

Answered
Divide a number by time
Convert the time to lowest common interval; looks like seconds and divide (or, of course, can use whatever time unit desired; mp...

10 years ago | 1

| accepted

Answered
How to repeat a for loop n times
Above loop can be simply states=2*(cdf('norm',z,0,1)>rand(size(z)))-1; where _z_ <<-->> AgentZScore To repeat, simply...

10 years ago | 0

Load more