Community Profile

# William Rose

Active since 2007

All

#### Content Feed

View by

Verify the Divergence theorem in MATLAB
@Camstien I now think there was a mistake in my earlier answer. Previously I said the integral for the top surface can be writt...

15 hours ago | 0

I'm still a beginner on MATLAB and I'm trying to write a real-time code to implement a DSP system, but an error keeps showing up (Array Indices must be positive or integers)
@Laura, Look at the loop where the error occurs: for i=0:(2*length(n)-1); y1(1,i+1)=h1_mirror(1,(end-i):1:end)*xs(1,1:i+1...

1 day ago | 0

Set Tolerance Distance when Interpolating with Nearest Value
@Ahmet Hakan UYANIK, I assume you know the heights at scattered points, and you want to interpolate the heights to points on a ...

3 days ago | 0

I'm struggling to find a way to filter the ECG signal and make modulation for the other signals
@Yousef Ahmed, please make an attempt. Then others will assist. For all of these, the carrier wave is fc=40 kHz. Therefore ...

3 days ago | 0

Creating variables in a foor loop using num2str
@Jiri Kovar, [edit: change "v" to "s" in my description, to match the code] N=50; for i=10:10:N, s.(strcat('a',num2str(i)))=i...

3 days ago | 0

Matrix size and scalar problem using fmincon
@Paul AGAMENNONE, It appears that the value Rs returned by parameterfun() is a vector (or array). Rs is a vector because funct...

3 days ago | 1

| accepted

Converting equations to first order system for ODE45
@Simon Aldworth, I think you are corect tht a state vector with six elements, as you have defined above, will suffice. If we c...

3 days ago | 1

Help me plot grafic pls.
@ebru, Yoiur foumula includes an infinite sum. Do a finite sum and see if it converges after 10 or 20 or 30 terms. When I do i...

4 days ago | 0

@Truc, Code below reads the data from the .xls file and adds channels III, aVR, aVL, avF. %% Read data from xls file. filenam...

4 days ago | 0

@Truc, It seems to me far easier to add the missing leads in Excel. The attached Excel workbook has columns added for leads III...

4 days ago | 0

I can't figure out how to write equations of motion into Matlab.
@Alejandro Nava, Please read the examples in ode45() help pages carefully, They are very helpful. You have two angular velocit...

5 days ago | 1

| accepted

The Newton Raphson Method
@Bruce, It appears that your x is a 2-coulmn array where column1 = theta, column 2=phi. I assume you have a function pendulum(...

5 days ago | 0

I'd like to know how to make histogram with matlab raw data file.
@HYUK BIN KWON, I recommend that you read the help for load and for importdata, and try the examples provided. histogram(x) do...

5 days ago | 0

Display divergence of trajectories
@Jambalya, PLease attach code as .m files instead of attaching screenshots of code. You say "after 1000 interations". I am no...

5 days ago | 0

@Vincent St-Pierre, I'm not sure why your code does not work, but a simple 4th order Butterworth works fine. See code below. ...

5 days ago | 0

| accepted

How do I compare two simulation files?
@Ali AlMuslih, Here is an example of what I mean. I am attaching two files of simulated data, with 5 records , plus a column f...

5 days ago | 0

how to plot bifurcation graph
@shiv gaur, I do not understand what you are bdoing with a(), b(), and c() inside the main loop (the loop "for j=2:Nt+1, ..., e...

6 days ago | 0

How to create a random n matrix with out any conditions
@Hajar Alshaikh, There is no way to create random numbers that are truly "without any condition". You can create random number...

9 days ago | 0

| accepted

Interpolate consecutive values of a single array
@Luca Castrogiovanni, I assume that the values in beta are not a simple sequence such as beta=1:100. If that were tru, this wo...

10 days ago | 1

| accepted

What factors influence the result of the optimization problem?
@Behrooz Daneshian, Usually a model makeas a specific prediciton, and the difference between the model prediction and the exper...

12 days ago | 0

How to take the average every 4 data points?
@민수, I assume that you want a function that returns the average of points 1-4, then the average of points 5-8, then the average...

12 days ago | 2

I am looking into how to create a function that would calculate the first derivative of a data set using the finite difference methods
@Sarah Elena Aiko Johnson, You have posted images which are screenshots of your code. It is more helpful if you cite and paste ...

12 days ago | 0

How to Plot the Trajectory of points on a bendRightAngle when Rotated 90 degrees
@Steven Thompson, Matlab can define a polygon. It could be convenient for your work. The only possible disadvantage is that a p...

15 days ago | 1

How to Plot the Trajectory of points on a bendRightAngle when Rotated 90 degrees
You can define a nx2 array of points on the sofa S=[0,0;1,0;2,0;3,0;3,2;2,2;2,1;1,1;0,1;0,0]; And plot it plot(S(:,1),S...

15 days ago | 0

difference between "geodetic2aer" and "azimuth" function
@MatG, azimuth, by default, assumes the Earth is a sphere. geodetic2aer() ias using wgs84 spheroid, in your usage. If you tell ...

16 days ago | 1

How do I plot a bifurcation diagram with known dynamical equations of motion (> 3 dimension)?
@Rebeka, Let's suppose that y is 1x5 and that the parameter is A, as in your diagram. Let's also assume that the equaitons of ...

16 days ago | 0

Call on function that takes in 2 variables multiple times
@Spacestudent112233, You can write a funciton that returns values whose size varies as the size of the inputs vary. I am not su...

16 days ago | 1

Error using Spherical harmonics: Array dimensions must match for binary array op.
@Jamie Al, [edit: correct spelling errors] The error is because Ylm has size 61x121, and p0 has size 128x128x128. Therefore y...

20 days ago | 0