Respondida
How can I modify the findpeaks command to give me a width at 80% of peak height (instead of at the build in 'halfheight')?
I'd suggest _*not*_ modifying |*findpeaks*| but to postprocess the results instead--a sample from one of the examples of the bas...

más de 9 años hace | 1

| aceptada

Respondida
plotxx scattered plot with smooth line and marker
|*plotxx*| is a File Exchange submittal -- and looks to be pretty limited in its implementation. If you start with it, you'll ha...

más de 9 años hace | 0

Respondida
Tracking boxplot x axis labels
OK, I came in late and just picked up on the _'ticklabel'_ part of the conversation. Went back to the beginning and looked at t...

más de 9 años hace | 1

| aceptada

Respondida
i am taking data from a txt file and doing some calculations on it and thn saving results into another. txt file but when i m opening it it is showing garbage value?
Just using a filename extension of _".txt"_ doesn't change the default behavior of |*save*| which is _*binary .MAT-file*_ format...

más de 9 años hace | 0

Respondida
How do I add a month as the xlabel on a grouped bar graph?
You can try it, but I doubt the _ticklabel_ property has been updated to accept categorical variables-- set(gca,'xticklabel...

más de 9 años hace | 0

Respondida
Second x-axis overwriting previous plot
The thing in the example you didn't copy is the use of |*line*| instead of |*plot*| to draw onto the second axis. |*plot*| does...

más de 9 años hace | 0

Respondida
I need to generat a structure name
While Stephen's answer is spot-on for variables, structures are different and can be manipulated more readily and without explic...

más de 9 años hace | 0

Respondida
Function gives ans=0 when comparing text
Read the data files as tables and use categorical variables; will make things downstream much simpler. >> inc=readtable('in...

más de 9 años hace | 2

| aceptada

Respondida
importdata from dat file not picking the first cell
The _Tips_ section in the doc for |*importdata*| has the following... Tips To import ASCII files with nonnumeric character...

más de 9 años hace | 0

| aceptada

Respondida
Add contents of two columns to new columns with a delimiter between them
Well, it's simply impossible to add something like that as another column in an |*int8*| array. To do something similar you _...

más de 9 años hace | 0

Respondida
How to write a condition ?
Can't. Comparison operations always return logical 0 (false) where A or B have NaN elements. Best you can do is test if resu...

más de 9 años hace | 0

Respondida
read the size of cell array with the same element
[u,iu]=unique(c{:},'rows'); n=histc(iu,1:length(u));

más de 9 años hace | 0

Respondida
Increase gap between XTick and XTickLabel
Tick labels are a 1:1 correspondence with the tick in sequence; the labels don't know about location; only ordinal number. Use ...

más de 9 años hace | 1

| aceptada

Respondida
Calculating velocity and acceleration from existing data
No looping needed; "Use the vectors, Luke!" in Matlab--that's its real advantage and you don't have to duplicate all those forum...

más de 9 años hace | 2

Respondida
How to truncate a time series to 20.000 points?
Don't know how you're getting the data, but if it is just a chosen length in number of elements (points), then simply data=...

más de 9 años hace | 1

| aceptada

Respondida
Reading a Matrix with operator and Cell Array from Excel
# *xlsread* reads the _value_ of the cell, not the underlying functional in the cell, if there is one. # An Excel spreadsheet c...

más de 9 años hace | 0

| aceptada

Respondida
How to sort a matrix based on two columns
>> sortrows(A,[1 3 2]) % doc sortrows for details... ans = 1 3 10 1 1 20 1 2 ...

más de 9 años hace | 9

| aceptada

Respondida
remove duplicated rows from a cell array ?
Sans the orientation (and not sure you can ensure the data are all symmetric to keep the square array?) >> [u,ix,ib]=unique(...

más de 9 años hace | 0

Respondida
Use of a specific field of a structure.
_"How can I define/express the "appropriate" field of the structure x?"_ That all depends on what the fields in structure _x_...

más de 9 años hace | 1

| aceptada

Respondida
How to let a script use a variable from the workspace.
Turn it into a function instead...it would also be more generic to pass the file name as well... function YourFuncNameHere(...

más de 9 años hace | 2

| aceptada

Respondida
Open new notepad and insert some text without saving it in file
No klew how well it works, but... <https://notepad-plus-plus.org/community/topic/10651/update-activex-plugin-1-1-7-3 <notepad-pl...

más de 9 años hace | 0

Respondida
How can I plot a graph with one series but different colors depending on another data ?
A line is a single color (limiting, I know, but true :( ) so to have different colors along the length of a line you'll have to ...

más de 9 años hace | 0

| aceptada

Respondida
Approximately equal sign in matlab plot
Get pretty close approximation (so to speak :) ) that way... hAx=axes; xlim([0,27]) set(hAx,'xtick',[0 15 25]) hT=...

más de 9 años hace | 1

Respondida
Removing the line number from a numerical matrix
The obvious answer would be this isn't the same code as you ran previously. There's nothing in this code that would do anything...

más de 9 años hace | 0

Respondida
How to get a smooth curve using plot in matlab
'spline' goes through the points given and uses a spline to fill in between. Perhaps you're looking for "smoothing spline". ...

más de 9 años hace | 0

Respondida
Different Colour for Candle
Well, the doc says _"(Optional) Candlestick color is specified as a character vector."_ which would indicate you can with just a...

más de 9 años hace | 0

Respondida
Creating time series vectors of unequal duration
One _possible_ interpretation... >> inear=interp1(a2,1:length(a2),a1(end),'nearest'); >> a3=[a2(1:inear-1) a2(inear):2:a...

más de 9 años hace | 1

| aceptada

Respondida
How do I fix my legend?
There's only one legend per plot; you're overwriting each pass thru the loop. for k=1:m scatter(x(:,k),y(:,k)) if...

más de 9 años hace | 0

| aceptada

Respondida
Creating time series vectors of unequal duration
_"... a3 should have a start point of a1(1) and an end point of a2(end) with an increment of 2."_ a3=[a1(1):2:a2(end)]; % ...

más de 9 años hace | 0

Respondida
Unsatisfying 2nd order fit - fitlm
W/o the data itself can't really tell, but certainly doesn't appear that the plot is the actual LS quadratic for the data given,...

más de 9 años hace | 1

| aceptada

Cargar más