답변 있음
How do I trim a WAV file from point A to B.
You have the sampling frequency as an output from the audioread function. The time vector would typically go t = 0:1/fs:(length...

6년 초과 전 | 0

답변 있음
Change axis from time to frequency
y is not a time series. Hz are not a unit of time. You cannot express something in the frequency domain as a function of time, b...

6년 초과 전 | 1

| 수락됨

답변 있음
Array indices must be positive integers or logical values.
Here is a minimal working example of your problem x = rand(1,15); ind = 2*0.14/0.02+1; % occurs when s = 8 x(ind) Error: Ar...

6년 초과 전 | 1

| 수락됨

답변 있음
A switch case statement that will help me to either run codeS in Windows or linux, based on whichever OS it is
if ismac % Code to run on Mac platform elseif isunix % Code to run on Linux platform elseif ispc % Code to run ...

6년 초과 전 | 0

| 수락됨

답변 있음
Improve performance on finding max values of matrix
clearvars; % create fake data [y,x] = meshgrid(1:5); data = [rand(size(x(:))).*x(:),y(:)].*2; % different values of x (1st ...

6년 초과 전 | 2

| 수락됨

답변 있음
Ploting Rayleigh faded signal copies
figure plot(t,real(sin1)) hold on plot(t,imag(sin1)) xlabel('Time') Or, using subplot figure subplot(2,1,1) plot(t,real(...

6년 초과 전 | 0

| 수락됨

답변 있음
is it possible to convert iddata to cellstr
Close, but you need to access the *contents* of the cell array, not the entire cell array itself. data.y(:,1) = {rand(500,...

6년 초과 전 | 0

답변 있음
grouping numbers in matrix
This is not a generalized solution, and assumes that there will always be three entries of each number (1, 2, 3) in A. [~,s...

6년 초과 전 | 0

답변 있음
Hilbert transform with sine and cosine
The hilbert transform, as per the documentation, indicates that the imaginary part of the transform is the original (real) seque...

6년 초과 전 | 0

| 수락됨

답변 있음
delete dimension based on user input
This should work. a = rand(4,3,2,5); % random 4D matrix dim = 3; % let's remove 3rd dimension numDims = 1:length(size(a)); % ...

6년 초과 전 | 1

답변 있음
Outliers in a dataset
If x is also size 50x2, then you should pick a column to index as well. mx1_1 = mean(x(R1,1)); mx1_2 = mean(x(R1,2));

6년 초과 전 | 0

답변 있음
How to change the color of the most recent plot point?
Consider the following idea: N = 10; cmap = parula(N); figure for n = 1:N plot(n,n,'o','Color',cmap(n,:)) ...

6년 초과 전 | 0

답변 있음
I want to know how to speed up my for loop,it's a simple for loop.thanks
You don't need to do this in a loop at all. Here is how to vectorize the creation of the indices from 1:103, ..., 410:512. From ...

6년 초과 전 | 0

| 수락됨

답변 있음
Undefined function or variable 'PrintSpaceTrussNodeCoordinate' error
Wherever you found this code, you need to download the associated functions with it. (Which I also said on the other question yo...

6년 초과 전 | 0

답변 있음
Problems when creating matrix
The results are equal up to double precision. Look at this: max(abs(categ1-categ2)) % ans = % 2.22044604925031e-16 eps ...

6년 초과 전 | 0

답변 있음
signal processing (segmentation )
If you want them sequentially, just put them back together using combinedSignal = [sig1 sig2 sig3]; % etc... sigN

6년 초과 전 | 1

| 수락됨

답변 있음
Finding max amplitude from cosine
The maximum amplitude of F(t) = A*cos(w*t) where A = 1, will always be 1, for all values of w. This doesn't require use of ...

6년 초과 전 | 0

답변 있음
vectors must be at the same length error
You are concatenating x and y into a doubly long vector. If you want to plot both signals, do plot(t,x,t,y)

6년 초과 전 | 0

| 수락됨

답변 있음
Index 2D matrix along line rotated about the matrix midpoint
Here is another idea, perhaps you can play with it. You'll have to implement this in a loop. [cx,cy,c] = improfile(I,xi,yi,...

6년 초과 전 | 0

답변 있음
display file function crash
try % some code here x = 1:5; for n = 0:4 y = x(n); % can't access x at position zero! end cat...

6년 초과 전 | 0

답변 있음
What is the origin of this bus error?
Seems like you are running too many processes and ran out of memory. I've had this happen before and I just needed to limit my p...

6년 초과 전 | 0

| 수락됨

답변 있음
Can only choose pi radians / sample in Passband frequency, not Hz.
_This toolbox uses the convention that unit frequency is the Nyquist frequency, defined as half the sampling frequency. The cuto...

6년 초과 전 | 1

| 수락됨

답변 있음
Cell to 3D Matrix
mycell = repmat({rand(360,900)},20,1); % this is what you currently have mat3D = permute(cat(3,mycell{:}),[2 3 1]); ...

6년 초과 전 | 0

| 수락됨

답변 있음
Creating multiple polar plot graphs for different frequencies
I'm writing the same thing here so this question can be answered. The issue is you are overwriting your variable f when you w...

6년 초과 전 | 0

| 수락됨

답변 있음
How to overlay a plot onto a scatter plot?
You cannot plot vectors of different size. whos x y xtrue ytrue You'll see that x and y are 300x1, xtrue is 1x10001, an...

6년 초과 전 | 0

| 수락됨

답변 있음
overlay mask on sequence of mri images to mark out tumor ROI
maskedImg = imgArray.*segment_mask; % segment_mask is size [256,256] % maskedImg is same size as imgArray [256, 25...

6년 초과 전 | 0

| 수락됨

답변 있음
Simulink error: The data abscissae must be distinct and strictly monotonic.
None of the variables in the matfile are monotonic. all(sign(diff(Tga))==1) % ans = 0 all(sign(diff(Tm1))==1) % ans = 0 all(s...

6년 초과 전 | 0

| 수락됨

답변 있음
How do I make heatmap axes order from bottom-top?
x = magic(10); figure imagesc(x) % notice the y-axis goes from 10-1 from bottom to top set(gca,'YDir','normal') % now it is r...

6년 초과 전 | 0

답변 있음
Could anyone suggest me is there any way of choosing maximum and minimum values together
A = [23 42 37 18 52]; minmaxVals = prctile(A,[0 100]) ans = 18 52

6년 초과 전 | 0

답변 있음
Generate a random signal in Matlab
y = (rand(10000,1) > 0.5)*2 -1;

6년 초과 전 | 1

| 수락됨

더 보기