Respondida
Looking for an efficient method to repeat the script command for multiple files
folder='C:\Documents\MATLAB\Neuralynx\9Hz\'; % target subdirectory file='CSC*.ncs'); ...

más de 8 años hace | 0

Respondida
How to put error bars on top of grouped bars
See my previous at <https://www.mathworks.com/matlabcentral/answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center#a...

más de 8 años hace | 2

Respondida
change calculation into financial/fiscal year
Actually, it's pretty simple to accomplish. Given the year and month vectors, create a "financial year" by yrFin=yr; ...

más de 8 años hace | 0

| aceptada

Respondida
plot a curved line of best fit through my data
<</matlabcentral/answers/uploaded_files/122744/untitled.jpg>> Post the data points, but the red line is clearly _NOT_ the lea...

más de 8 años hace | 0

Respondida
How to call a user-defined function
Store it in the working directory or in a directory on MATLABPATH. Depending on what the function purpose is, specialized or mo...

más de 8 años hace | 0

| aceptada

Respondida
how can i add rows of multidimentional cell array ?
On the presumption interpreted the desire as _only_ the first row sum-- >> A=cell(3,5); % cr...

más de 8 años hace | 0

Respondida
can any one suggest me how we can fit a distribution which is a sum of various standard distributions to given data or to a normalized histogram
See doc cftool for the interactive fitting tool; it includes builtin Gaussian with up to eight (8) terms; it doesn't hav...

más de 8 años hace | 0

Respondida
How can I plot multiple graphs from a name column (from Excel)
Use |readtable| and then |splitapply| with the first column ID as grouping variable. I suggest turning it into categorical vari...

más de 8 años hace | 0

Respondida
webread exiting because of bad internet connection - how to continue the program automatically
See the section on Exception Handling in the documentation...specifically, doc try doc catch

más de 8 años hace | 0

| aceptada

Respondida
How know the size of matrix after delete raws
_"I want to delete all rows that start with an element greater than 5 in the matrix"_ In Matlab, use "logical addressing" for...

más de 8 años hace | 1

Respondida
How do I crop white space from datetime plots ?
xlim([datetime(yL,mL,dL) datetime(yR,mR,dR)]) where yX,mX,dX are year/month/date for Left/Right axes limits desired. _Pres...

más de 8 años hace | 0

Respondida
how to read data and put them into separate line?
In that case (known record length) >> L=23; % define record length >> fmt=repmat('%c',1,L); % format...

más de 8 años hace | 0

| aceptada

Respondida
How to store value in a two dimentinal array in matlab
Every time you execute B = cell(size(e)); you create a new empty cell array of size(e) empty matrices so for every loop...

más de 8 años hace | 0

Respondida
How can I get data computed inside of a function to my work space to use?
Anything you want to can be returned as one or more output arguments either as individual variables or arrays or any other highe...

más de 8 años hace | 0

| aceptada

Respondida
Matlab text file opts varying for similar files
The difference is that the second file has the UND indicator in the first data line whereas the first file has a completed recor...

más de 8 años hace | 1

| aceptada

Respondida
Import data based on markers in Excel.
Read the text data from the spreadsheet in column A and locate the two fields, then reread with the specified range thus compute...

más de 8 años hace | 0

Respondida
Reading a generic text file with string and number
line1 = textscan(fid, '%s%s%s%f%f%f%f%f%f%s%f%s\r\n','HeaderLines',41); >> fmt='%s%s%s%f%f%f%f%f%f%s%f%s' fmt = '...

más de 8 años hace | 0

| aceptada

Respondida
Plotting equation with specific input range
fnF=@(x) min(1,2*x./(x+5)); x=1:10; plot(x,fnF(x))

más de 8 años hace | 0

| aceptada

Respondida
How can I create a vector of markers for a scatter plot
... c=[102, 215, 209;253,174,97;215,25,28]/255; m=['o','d','s']; figure, hold on for i=1:size(x,2) scatter (x...

más de 8 años hace | 0

| aceptada

Respondida
Hi - Please why I don't get the excat amplitude in the spectrum of two added sine waves xt= 0.7*sin(2*pi*50*t)+sin(2*pi*120*t) , I mean i don't get excatly 0.7 for 50 Hz - nor excatly 1 for 120 Hz
To amplify on Ameer's answer... >> [p, fr]=findpeaks(a,f,'minpeakheight',0.25) p = 0.6097 0.9503 fr = 49.8047...

más de 8 años hace | 5

Respondida
Using errorbar for multi-column datasets without loop
I get the same error if I try to use a single error value for all _y_ regardless of number of columns; I thought previous versio...

más de 8 años hace | 0

Respondida
How to speed up my code
Not surprising replacing with |max| increased run time...see if the following produces same result/makes any significant timing ...

más de 8 años hace | 0

| aceptada

Respondida
Cannot get textscan() while loop to work
Format string is in error; the last numeric value on each record is floating point. fmt=['%s%s' repmat('%f',1,3)]; % text...

más de 8 años hace | 0

Respondida
Finding the First Dates of each Month
If the sample dates are what your data file has for the first data in the respective month and year, it appears the data are inc...

más de 8 años hace | 0

Respondida
Opening files with for loop, switches to parent directory
I'm thinking the code shown doesn't have such a symptom; the content of the variable |file| will be that of |files| as there is ...

más de 8 años hace | 0

| aceptada

Respondida
Optimizing indirect mapping: From matrix elements to vector values
OK, with the additional information, remove the 2D nature and use |interp1| function density = get_density(x, Density, Grid...

más de 8 años hace | 0

| aceptada

Respondida
How to plot temporal changes in batches of data?
t=readtable('crowe.csv'); t.SSID=categorical(t.SSID); t.Time=datetime(t.Time); figure,hold on [g,ids]=findgroups(t...

más de 8 años hace | 1

| aceptada

Cargar más