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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 0

Answered
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

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 1

| accepted

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

8 years ago | 0

Answered
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 = '...

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 5

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 1

| accepted

Answered
How can I shade an area of my graph between two vertical lines?
iz=linspace(20,24,40); yz=pdf(pd,iz); area(iz,yz) <</matlabcentral/answers/uploaded_files/121187/untitled.jpg>>

8 years ago | 2

| accepted

Answered
bar graph command for range values
if numtests > 1 figure1 = figure('Color',[1 1 1]); subplot(141); bar(ampsCAP(1,:)); title([int2str(Cs(1,1)) ' Hz']);...

8 years ago | 0

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
... normalize8=uint8(normalize); X1=normalize8(X)+0.01; %for the log operation ... You defined |normalize| as a fl...

8 years ago | 0

| accepted

Answered
Adding duration in second as x axis
Don't alias the builtin |duration|; that _will_ create problems working with time objects. You don't really want a duration, ...

8 years ago | 0

| accepted

Answered
how to create multiple axis at x axis on same time window? i have attached one image of that kind. Please help.
Start with |subplot| and mung on it a little... hSp(1)=subplot(3,1,1); % two subplots in space for th...

8 years ago | 0

Load more