Respondida
Algorithm for a Loop in a Table
In your case, you'd need to use hand entry. However, if your pattern is repeating then, you can employ replem() and get these. ...

casi 5 años hace | 0

| aceptada

Respondida
how to sampling the signal in order to match the two signal?
% They perfectly match as you can see the plot below. MC = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_...

casi 5 años hace | 0

Respondida
Sampling data at x_n=cos(n*pi/N) for fft derivative
I'd see here to use logical indexing for sampling. E.g.: N=10; y=rand(1,N)*10; x_n = cos((0:N)'*pi/N); Y_Sampled=y(x_n>=0)...

casi 5 años hace | 1

Respondida
Sum using for loop
In your code, there is an err inside a loop, and here is the correction; ... % E.g. X and Y can be a row or column vector of a...

casi 5 años hace | 0

Respondida
how do I play sound during drawing a live plot
You should include an audio file along with the videoFrame in your code, e.g.: writerObj = videoFWriter('neuronfire.avi','my_mu...

casi 5 años hace | 0

Respondida
Reducing the distance among subplot figures?
Set up axis position of subplots, e,g: x=0:1:360; y=-180:1:180; G = cos(x)+sin(y(:)); HA(1) = subplot(221); surf(G) HA...

casi 5 años hace | 0

Respondida
how can i fix Error using sym/min (line 101)
It looks like one of your intoduced symbolic variables is defined to be class type of "char". Check all symbolic variables usin...

casi 5 años hace | 0

Respondida
Convert time domain to frequency domain quarter car suspension model
Your question is more of a mechanical engineering (vibrations and control domain) related type. Note that to switch or obtain Fr...

casi 5 años hace | 0

| aceptada

Respondida
Trying to vectorize this for loop of creating matrices within matricees
If undesrtood your question correctly, you are trying to select particular regions of images and save them. If so, this can be...

casi 5 años hace | 0

Respondida
Pre-allocate memory to zeros or NaN?
Of course, you can do memory allocation with nan() as well alike zeros(), e.g.: k=10; m=15; M = nan(k, m); ...

casi 5 años hace | 0

Respondida
How to create an array with user inputs?
You can consider using input() prompt. See this doc with examples: https://www.mathworks.com/help/matlab/ref/input.html?s_tid=sr...

casi 5 años hace | 0

Resuelto


Split a given string from the first instance of a given character
A simple operation to split a given string into two substrings at the point where the desired character is first found. e.g. ...

casi 5 años hace

Resuelto


most frequent character
Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

casi 5 años hace

Resuelto


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

casi 5 años hace

Resuelto


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

casi 5 años hace

Respondida
2D ODE with constant? how to solve
Most parts of your code is ok, but within the loop, you have overlooked sth and thus, you final solutions are not quite accurate...

casi 5 años hace | 0

| aceptada

Respondida
Extract row from time series table based on independent variable
% Use Logical Indexing: IDX = (channel0.data>133.01 & channel0.data<133.03); DATA_OK=DATA(IDX,:); ...

casi 5 años hace | 0

Respondida
How to loop through variable names and to save them on one file?
It looks that will require another loop outside the main loop, something like this one, e.g.: for i = 1:height(unique(data_time...

casi 5 años hace | 0

Respondida
Get peak values from a Surface mesh figure?
You can use MATLAB's built in findpeaks() fcn to clocate local maxima of your data - see the doc: https://www.mathworks.com/help...

casi 5 años hace | 0

Respondida
How to locate the index of cell array that has highest element value?
You can do it with sort() and by manipulating your main cell array a little bit. See this plain example: A{1,1}=1; A{2,1}=5; A...

casi 5 años hace | 0

Respondida
2D ODE with constant? how to solve
Use odex (ode23, ode45, ode113, etc.) solvers. See this doc how to employ them in your exercise: https://www.mathworks.com/help/...

casi 5 años hace | 0

Respondida
Multiple piecewise linear fitting equation extraction
Yes, it is viable. There are a few discussions in MATLAB community how to do such regressions. Here is one of them: https://www....

casi 5 años hace | 0

Respondida
Can I monitor the progress of a fitting?
If you are going to employ nonlinear fit with lsqcurvefit or fminunc, you can obtain some data from each iteration, see the full...

casi 5 años hace | 0

Respondida
Create arrays of observations
Here is one of the viable solutions with dynamically naming variables and attaining their values from the workspace. a = []; f...

casi 5 años hace | 0

| aceptada

Respondida
Smooth a curve or increasing the resolution?
You may consider using a moving average filter smoothdata() with sgolay, for instance.

casi 5 años hace | 0

Respondida
Build a vector of file names with formatting and leading zeros
You can try using strcat() that works quite efficiently, e.g.: A = 'My_file_'; B='_'; firstInteger1=10; secondInteger1=20; Fi...

casi 5 años hace | 0

Respondida
ODE Undamped Spring Model is losing energy over time
A very nice question and observation! This is due to default error tolerances of the solver (ode45). By tightinging the relati...

casi 5 años hace | 1

| aceptada

Respondida
Tips for organizing variables in the workspace? Is there an option like "exlude capitalized variables" like python/spyder?
The answer is "No". See this discussion: https://www.mathworks.com/matlabcentral/answers/181465-matlab-2014-change-workspace-sor...

casi 5 años hace | 1

Respondida
how to convert table to matrix?
Another alternative to convert table to matrix is to use a syntax: M=T.Var, e.g. T = table(magic(5)) M=T.Var1

casi 5 años hace | 1

Respondida
How can I plot the SNR graph?
I have looked through your code that is written according to your provided formulations. That means that your provided formulati...

casi 5 años hace | 0

| aceptada

Cargar más