Community Profile

photo

Anuradha Bhattacharya


Active since 2015

Statistics

  • Thankful Level 3

View badges

Content Feed

View by

Question


Why am I getting the following error when I am using function for generating random number?
x = random('Poisson',1:100,1,10); Error using poissrnd (line 28) Size information is inconsistent. Error in prob...

7 years ago | 1 answer | 0

1

answer

Question


I have to get the x values for peaks occuring in my plot? What will be the code for that?
The following is my code: a = load('ra1.dat'); x = a(:,1); y = a(:,2); y_mov_average = filter(ones(1,10)/10,1,y); ...

7 years ago | 1 answer | 0

1

answer

Question


When I am running findpeak it is giving me the following error? Why is there this error? How to modify the code to fix it?
a = load('ra1.dat'); x = a(:,1); y = a(:,2); plot(x,y); findpeaks(y,x); The following error is being given: ...

7 years ago | 1 answer | 0

1

answer

Question


My for loop is not executing. Atleast that's what I think becoz its not returning any value. What seems to be the problem?
a = load('ra1.dat'); x = a(:,1); y = a(:,2); hold on plot(x,y)'; for i=1:1950; a(((y(i+50)-y(i))/(x(i+50...

7 years ago | 1 answer | 0

1

answer

Question


fopen is not being supported in my MATLAB version. What else can I use?
Whenever I use fopen it is giving some or the other error. Please tell me an aletrnative.

7 years ago | 1 answer | 0

1

answer

Question


When I run the following code it only shows the last file in the directory in MATLAB workspace? How do I get all the files in my directory saved in the workspace?
ivsFiles = dir('*.ivs'); numfiles = length(ivsFiles); for k = 1:103; filename = ivsFiles(k).name; fileID = filenam...

7 years ago | 1 answer | 0

1

answer

Question


How do I open a sequence of files using textscan? The files are named ra1001 to ra1150. Thanks in adavance. Any help would be much appreciated.
Each file contains data in the following format and I want to skip the headerlines: UK SOFT software UK2002S 5.3.3 Fil...

7 years ago | 1 answer | 0

1

answer

Question


How do I load read only the two number columns skipping headerlines using dlmread?
This is the file: UK SOFT software UK2002S 5.3.3 FileVersion 7 op_mode SPECTROSCOPY Microscp_type ...

7 years ago | 1 answer | 0

1

answer

Question


I am getting a bug in my code using fprintf, can someone tell me why?
This is my code: a = load('xaxisfig7line1'); x = a(:,2); y = a(:,1); dy = diff(y)./diff(x); b = [0]; dy = ve...

8 years ago | 0 answers | 0

0

answers

Question


Hi, I have a x vs y text data file. I want to find the maximum and minimum value of first derivative of the y w.r.t x and store the corresponding x and y values. Can anyone tell me the MATLAB code for that? Thanks in advance!
This is the code I have written: >> a = load('xaxisfig7line1'); >> y = a(:,2); >> x = a(1,:); >> dy = diff(y)./diff(x); ...

8 years ago | 1 answer | 0

1

answer

Question


I am running a code on autocorrelation in my MATLAB console but it is giving error. Can anyone point out the issue and how to fix it?
a = load('60lowfreehigh.lvm'); >> N = 50; >> y = a; >> z = a; >> for i=1: N-1 for i=N-1:-1:1 a(i+1)=a(i); ...

8 years ago | 0 answers | 0

0

answers

Question


Can anyone provide a code for calculating autocorrelation without autocorr?
Can anyone provide a code for calculating autocorrelation without using autocorr as I do not have the econometrics toolbox?

8 years ago | 3 answers | 1

3

answers

Question


How do I plot multiple plot using cftool in the same figure palette?
I want to fit multiple plots using cftool in the same figure palette; How do I do that?

9 years ago | 1 answer | 0

1

answer

Question


How do I fit a gaussian to a given plot?
I have a histogram to which I want to fit a gaussian without using cftool. Typically how should I use cfit to fit the data?

9 years ago | 1 answer | 0

1

answer

Question


The following code for fitting a gaussian is returning the error "There should be atleast two data points". There are definitely more than two data points. Kindly help me resolve this issue.
K>> dbstop if error K>> a = load('calibrate100proc10.lvm'); K>> x = a(:,1); K>> y = a(:,2); K>> plot(x,y); K>> d = hist(y,1...

9 years ago | 1 answer | 0

1

answer

Question


How do I fix the following code?
>> filename = load('proctrial_1.lvm'); >> timedata = filename(:,1); >> xvoltage = filename(:,2); >> plot(timedata,xvoltage)...

9 years ago | 1 answer | 0

1

answer

Question


In MATLAB how is it possible to select a certain data portion from a big file of data?
I have a time series data which I am loading. I want to know how to plot only a segment of the data. What are the commands in M...

9 years ago | 1 answer | 0

1

answer

Question


How is it possible to generate a text file of data points from a MATLAB figure file?
I have plotted a figure from a file in labview in matlab. Now I am brushing a selected region. How do I generate a data file o...

9 years ago | 0 answers | 0

0

answers

Question


Another query is what am I doing wrong in this program to calculate moving average?
load('proctrial_1.lvm); output = tsmovavg('proctrial_1.lvm','s',1000,2) plot(output); plot(output) x = ou...

9 years ago | 2 answers | 0

2

answers