Community Profile # William Rose

Active since 2007

#### Statistics

All
• • • • • • • • • • #### Content Feed

View by

How to accurately compute the phase lag between two time series with same sampling frequency.
@Adnan Barkat, There is a nice reuslt below, it just takes a while to get to it. To estimate phase lag of ser1 relative to ser...

6 hours ago | 1

How to accurately compute the phase lag between two time series with same sampling frequency.
@Adnan Barkat, I will address your quesiton about phase, but first I have some quesitons. Then I adress phase, below. Your up...

8 hours ago | 1

How to use quiver correctly?
@Jin Hung, The code below makes a plot like the plot you posted, which you said you want to mimic. This code does not use quiv...

1 day ago | 1

How to use quiver correctly?
@Jin Hung, I am mostly copying the code of @KSSV. I am trying to make a plot like the oe you want to mimic. @KSSV's code give...

1 day ago | 0

Fundamental question about extracting a portion of repeating data over a large data set.
@David Probst, This version reads data from the file you posted. The columns are time, sensor reading. The first data point i...

1 day ago | 0

| accepted

Fundamental question about extracting a portion of repeating data over a large data set.
@David Probst, Adjusting my answer in light of your comments and in light of the figures you posted. In the second figure you ...

1 day ago | 0

Fundamental question about extracting a portion of repeating data over a large data set.
@David Probst [Edit: fix typo in my comments: change "No" to "Now". Code is OK, I think.] I will make some data, assuming Pt ...

1 day ago | 0

Contour plot for a non rectangular object
@Ghazwan, [X,Y]=meshgrid(x,y) makes a grid where all the x values are the same across the grid, and likewise for yhe y values. ...

1 day ago | 0

| accepted

Plotting x(2t+2) if x(t) is defined as an anonymous function
@Yakov, [edit: correct typos (no typos in the code) ] You need to define u. If you define the muliplications inside g() with...

2 days ago | 1

How do I get the line of best fit and its equation from multiple datasets?
@Kogulan Paulmurugan, It appears from the code that you are reaidng data from 2 files, and you ar extracting four portions of t...

2 days ago | 0

how to delete certain columns and rows from matrix
If you want to sepcify the rows and columns to delete: M = [1000 -1000 0 0; -1000 10000 ...

2 days ago | 0

how to delete certain columns and rows from matrix
@Antrea Plastira, M = [1000 -1000 0 0; -1000 10000 0 -9000; 0 ...

2 days ago | 0

| accepted

Choosing one peak out of two in FFT function
@Hussein Kokash, The output of y=fft(x) is symmetric about the middle of the array y.* This is due to the mathematics of the d...

2 days ago | 0

| accepted

Monte Carlo method to estimate pi, but I'm lost
@Kevin Nelson, [correct my many typos] The idea is to use Monte Carlo estimation to estimate pi, and to see how the estimate g...

3 days ago | 0

How to plot the convolution integral of two functions
@Anthony Koning, Let's use e(-x) and e(-2x), since e(+20) is so big. N=21; deltax=.5; x=(0:N-1)*deltax; xc=(0:2*N-2)*deltax...

4 days ago | 1

How to solve systems of non linear partial differential equations using finite difference method?
@RITIKA Jaiswal, Edited: Corrected error in the code in the equation for Tcool. Changed vz=1 to vz=0.5, to match value give...

4 days ago | 0

How to plot lines between points
@KonVak N=76; %number of points z=80*rand(N,3); %point coordinates routes=[1 5 46 1 0 0 0 0 0 0 0; 1 41...

4 days ago | 1

| accepted

applying smote for multi-channel unbalanced dataset
@Demet, you're welcome. I notice that the manuscript link I provided took a long time to load, when I tried it. Here is an a...

5 days ago | 0

applying smote for multi-channel unbalanced dataset
@Demet, "Matlab's smote functions", to which you refer, are from the File Exchange. That is not part of standard Matlab. The F...

6 days ago | 0

Rendering human avatar using forward velocity and turning rate inputs
@Jaskaran Singh Grover, I think you will have to do some serious coding on your own. Check out the Matlab File Exchange. I jus...

7 days ago | 0

MATLAB Answers Wish-list #5 (and bug reports)
Sometime a poster posts approximately the same quesiton more than once, for whatever reason. Is there a way for a moderator to m...

7 days ago | 0

How do I extract x&y axes data from a raster plot?
@ar, I assume these are action potential times for a set of neurons. What is the format of the data? Do you only have an image?...

7 days ago | 0

Calculate work has been done by pressure (detailed explanation inside)
@Miraboreasu, I think part of the lack of understanding that has arisen during our discussion is that I am not sure if the velo...

7 days ago | 1

| accepted

how to read a text file that contains a sinewave form in one column,then plot it on matlab?
@SimTec, It seems that you have opened the file for writing ('w') which erases the exisitng file, if it exists. You write the ...

7 days ago | 0

| accepted

how to draw a plane from X Y Z points
@Mikel Here is a code fragment that fits a plane to the 3D data in the file, and plots the 3D data from the file as well as the...

7 days ago | 1

| accepted

how to draw a plane from X Y Z points
@Mikel, [edit: corrected a + that should have been -, on right side of equation z=... below] It seems that you are using the w...

7 days ago | 0

Any suggestions to calculate the threshold of pixel intensity between two regions(the dip represents low intensity)
@BA, I need more information to understand and help. I see that your code gets two points (x1,y1 and x2,y2) on image 1 in a se...

8 days ago | 0

Triangle inequality for Gausisian Random Variable
@Ahmad Khalifi, N=10; R1=zeros(N,1); %to record the results R2=zeros(N,1); for T=1:N h=randn(1,2)+1i*randn(1,2); %this ...

11 days ago | 1

| accepted