已回答

How to find the 5 minimum values in a multidimensional matrix and the indices to which these entries correspond.

@Charles Howman, A=rand(3,4) [r,c]=size(A); k=5; %number of values to find [minval,idx]=mink(reshape(A,[],1),k); minrow=mo...

How to find the 5 minimum values in a multidimensional matrix and the indices to which these entries correspond.

@Charles Howman, A=rand(3,4) [r,c]=size(A); k=5; %number of values to find [minval,idx]=mink(reshape(A,[],1),k); minrow=mo...

2 months 前 | 0

已回答

How to solve gimbal lock logically?

@Kang Geonhui, My lecture notes on rotation matrices are attached. Lectures 2 and 3 include discussion of helical angles. The...

How to solve gimbal lock logically?

@Kang Geonhui, My lecture notes on rotation matrices are attached. Lectures 2 and 3 include discussion of helical angles. The...

2 months 前 | 2

已回答

How to solve gimbal lock logically?

@Kang Geonhui, Yes, your plot illustrates what happens when you are near "gimbal lock". Interpolation is not a good idea. ...

How to solve gimbal lock logically?

@Kang Geonhui, Yes, your plot illustrates what happens when you are near "gimbal lock". Interpolation is not a good idea. ...

2 months 前 | 2

| 已接受

已回答

Find Yaw and Pitch of center point of a line segment with respect to static frame

@VR, It is not possible to "calculate the position and orientation (roll, pitch, yaw) of the center point". A point does not h...

Find Yaw and Pitch of center point of a line segment with respect to static frame

@VR, It is not possible to "calculate the position and orientation (roll, pitch, yaw) of the center point". A point does not h...

2 months 前 | 0

| 已接受

已回答

How to write a for loop to generate a new set of initial conditions based on a input value that changes over different time intervals.

@Ron_S, See attached code. I think you will be able to uunderstand what I have done by comparing the code to your version. It...

How to write a for loop to generate a new set of initial conditions based on a input value that changes over different time intervals.

@Ron_S, See attached code. I think you will be able to uunderstand what I have done by comparing the code to your version. It...

2 months 前 | 0

| 已接受

已回答

Calculate spectrogram with logarithmic-spaced frequencies

@dormant, I agree that the bottom plot in your example, which should have the frequencies evenly spaced on a log scale, appears ...

Calculate spectrogram with logarithmic-spaced frequencies

@dormant, I agree that the bottom plot in your example, which should have the frequencies evenly spaced on a log scale, appears ...

2 months 前 | 0

已回答

rotated plot gone wrong

@Sonia, Change [w,rh]=freqz(h,1,64); to [rh,w]=freqz(h,1,64); Good luck.

rotated plot gone wrong

@Sonia, Change [w,rh]=freqz(h,1,64); to [rh,w]=freqz(h,1,64); Good luck.

2 months 前 | 1

已回答

A function related with speed light and time

@Lewis HC, It is nice to see that you have made an attempt before posting your question. @Walter Roberson is exactly right as ...

A function related with speed light and time

@Lewis HC, It is nice to see that you have made an attempt before posting your question. @Walter Roberson is exactly right as ...

2 months 前 | 0

| 已接受

已回答

Cross-correlation signal alignment

@Albert Zurita [edit: Add comment about circular correlation; correct typos.] You need to use a circular correlation, because ...

Cross-correlation signal alignment

@Albert Zurita [edit: Add comment about circular correlation; correct typos.] You need to use a circular correlation, because ...

2 months 前 | 0

| 已接受

已回答

How to graph cdf?

@Estela, I agree with the comments of @John Morris. The probability that a random number generator for a continuous distributi...

How to graph cdf?

@Estela, I agree with the comments of @John Morris. The probability that a random number generator for a continuous distributi...

2 months 前 | 0

已回答

How to find the QRS complex for this ECG signal?

@Susan, Perhaps the comments above constitute an answer to your question. ECGs=load('ECG'); ECG=ECGs.ECG; L = numel(ECG); t...

How to find the QRS complex for this ECG signal?

@Susan, Perhaps the comments above constitute an answer to your question. ECGs=load('ECG'); ECG=ECGs.ECG; L = numel(ECG); t...

2 months 前 | 0

| 已接受

已回答

Interpolating Data in 2D Mesh or Surf Plot?

@Sees, [edit: I hit Submit belfore I was done] You say you want to interpolate z values at the points where z=0, and you want...

Interpolating Data in 2D Mesh or Surf Plot?

@Sees, [edit: I hit Submit belfore I was done] You say you want to interpolate z values at the points where z=0, and you want...

2 months 前 | 0

已回答

How to use pwelch for PSD?

@Tran, See my recent reply to @vo, here, regarding the use of Welch's method for EEG analysis. You can get identical results ...

How to use pwelch for PSD?

@Tran, See my recent reply to @vo, here, regarding the use of Welch's method for EEG analysis. You can get identical results ...

2 months 前 | 0

| 已接受

已回答

PSD with Alpha(8-13HZ)

@vo, [edit: replace 8 with flo and 12 with fhi in the code to compute vector fA.] The data file you gave is a structure. The ...

PSD with Alpha(8-13HZ)

@vo, [edit: replace 8 with flo and 12 with fhi in the code to compute vector fA.] The data file you gave is a structure. The ...

2 months 前 | 0

已回答

Least Squares method code

@A, [edit: I adjusted the fprintf() lines to produce better output.] X = [0.8; 1.4; 2.7; 3.8; 4.8; 4.9]; Y = [0.69; 1.0; 2...

Least Squares method code

@A, [edit: I adjusted the fprintf() lines to produce better output.] X = [0.8; 1.4; 2.7; 3.8; 4.8; 4.9]; Y = [0.69; 1.0; 2...

2 months 前 | 0

已回答

Get envelope of a cyclic curve

@Nikesh Maharjan, Use convhull() to find the smallest convex shape that wraps around the points. See code below. data=xlsread...

Get envelope of a cyclic curve

@Nikesh Maharjan, Use convhull() to find the smallest convex shape that wraps around the points. See code below. data=xlsread...

2 months 前 | 1

| 已接受

已回答

Find the max psd

@vo, [This answer is a copy of my comment above. I intended my comment to be answer, but I posted it in the wrong place.] I a...

Find the max psd

@vo, [This answer is a copy of my comment above. I intended my comment to be answer, but I posted it in the wrong place.] I a...

2 months 前 | 0

| 已接受

已回答

How to catalogue a dataset during different stages of data filtering?

@Carter Hoffman, Here is an example. data1=randn(1000,5); %1000x5 array of random numbers size1=data1(:,5); ...

How to catalogue a dataset during different stages of data filtering?

@Carter Hoffman, Here is an example. data1=randn(1000,5); %1000x5 array of random numbers size1=data1(:,5); ...

2 months 前 | 0

已回答

how to ues t_tide

@ke, the t_tide package includes may functions including t_tide.m. The code for t_tide.m has extensive comments describing its ...

how to ues t_tide

@ke, the t_tide package includes may functions including t_tide.m. The code for t_tide.m has extensive comments describing its ...

2 months 前 | 0

| 已接受

已回答

How to plot the diffusion curve for different timesteps?

@Emily, I assume this is 1D diffusion, and you want to plot concentration versus position at t=0, t=500, t=1000, ... Before y...

How to plot the diffusion curve for different timesteps?

@Emily, I assume this is 1D diffusion, and you want to plot concentration versus position at t=0, t=500, t=1000, ... Before y...

2 months 前 | 0

| 已接受

已回答

third-order Newton’s interpolating polynomial

@ِAbo Alqahtani, Here is the start of a solution. You will learn a lot more about Matlab by finishing it yourself. Good luck...

third-order Newton’s interpolating polynomial

@ِAbo Alqahtani, Here is the start of a solution. You will learn a lot more about Matlab by finishing it yourself. Good luck...

2 months 前 | 0

已回答

Extract of data for the last time step

@University Glasgow, Please post the simplest possible code example that illustrates the issue you have. When you include code, ...

Extract of data for the last time step

@University Glasgow, Please post the simplest possible code example that illustrates the issue you have. When you include code, ...

2 months 前 | 0

| 已接受

已回答

How to plot a cylinder from a specified axis

@Telema Harry, r = 20; p0=[25,25,0]; %base location [X,Y,Z] = cylinder(r); h = 80; Z = Z*h; X=X+p0(1); Y=Y+p0(2); Z=Z+p0(...

How to plot a cylinder from a specified axis

@Telema Harry, r = 20; p0=[25,25,0]; %base location [X,Y,Z] = cylinder(r); h = 80; Z = Z*h; X=X+p0(1); Y=Y+p0(2); Z=Z+p0(...

2 months 前 | 0

| 已接受

已回答

How to change the visualization from lines to a patch

@Amanda, To help me create the maze, I made the image below. It could be helpful to future maze makers. Then I wrote a main ...

How to change the visualization from lines to a patch

@Amanda, To help me create the maze, I made the image below. It could be helpful to future maze makers. Then I wrote a main ...

2 months 前 | 0

| 已接受

已回答

Parameters seem to not be optimizing in fmincon

@Joshua Scott, Here is what I understand from reading your code. Correct me if I am wrong. Function Posterior3(data, idx, para...

Parameters seem to not be optimizing in fmincon

@Joshua Scott, Here is what I understand from reading your code. Correct me if I am wrong. Function Posterior3(data, idx, para...

2 months 前 | 0

已回答

How do you plot a wave rose/polarhistogram?

@Whale_Shark, Here is a script that plots a regular histogram of wind direction and the same data in polar form. Data is from ...

How do you plot a wave rose/polarhistogram?

@Whale_Shark, Here is a script that plots a regular histogram of wind direction and the same data in polar form. Data is from ...

2 months 前 | 1

已回答

Creating a figure with multiple raincloud plots with the same y-axis

@Eleonora Montagnani, It would help if you woudl provide a drawing or other image of what you want. It would also help if you ...

Creating a figure with multiple raincloud plots with the same y-axis

@Eleonora Montagnani, It would help if you woudl provide a drawing or other image of what you want. It would also help if you ...

2 months 前 | 0

已回答

What's the simplest way to determine the mass of a sphere from a plot of its density varying in r?

@Alain Vella, I agree with @David Hill, except you want to multiply the density at each value of r by 4*pi*r^2*dr, then add the...

What's the simplest way to determine the mass of a sphere from a plot of its density varying in r?

@Alain Vella, I agree with @David Hill, except you want to multiply the density at each value of r by 4*pi*r^2*dr, then add the...

2 months 前 | 0

已回答

How to know what pixels where compressed and not compressed in a image?

@Hudson Romualdo, It is not true that specific pixels are compressed or not compressed whn an image is compressed. The JPEG al...

How to know what pixels where compressed and not compressed in a image?

@Hudson Romualdo, It is not true that specific pixels are compressed or not compressed whn an image is compressed. The JPEG al...

2 months 前 | 0

| 已接受

已回答

How to pick group sum values from an array

@Poorna Durga Geesupalli, [edit: correct a typo in one of the comment lines in the code, fix indenting, add comments] Xs='1111...

How to pick group sum values from an array

@Poorna Durga Geesupalli, [edit: correct a typo in one of the comment lines in the code, fix indenting, add comments] Xs='1111...

2 months 前 | 0

| 已接受