Answered
I am writing a code to solve 5 simultaneous equations with 5 unknowns. I am using the function vpasolve, however the code takes 50 minutes to run. Is there a quicker way of solving the equations?
I would do this numerically, using *|fsolve|*. It requires a slight re-write of your equations to make them all implicit. ...

8 years ago | 0

| accepted

Answered
How to write a negative objective function for fmincon
If that is actually the function you want to maximize, use an anonymous function as your objective function: f = @(x) (30....

8 years ago | 0

| accepted

Answered
Inefficient tall timetable lookup script, how to optimize?
I cannot follow what you want to do well enough to provide any specific code. However, the <https://www.mathworks.com/help/matl...

8 years ago | 0

Answered
Extracting data in specific time intervals
One approach: C = {'20130102 01:00:00:558' 30.33 '20130102 01:00:01:272' 30.325 '20130102 01:00:0...

8 years ago | 1

| accepted

Answered
how to get noisysig.mat which is used in denoising signal using wavelets
It apparently existed in *|2016|*, but apparently no longer does. I cannot find it in an Interweb search The closest I can com...

8 years ago | 2

Answered
how to get intersection point of two curves?
Try this: syms Rb R1=200; R3=100; R2=(R1+R3)/2; theta=135; Rb=vpasolve((tan(acos(Rb/R1))-tan(acos(Rb/R2))-(...

8 years ago | 0

| accepted

Answered
Problem recovering the filtered signal using IFFT
Your filtering approach is incorrect. Try this: load('H.mat'); time=H(:,1); field=H(:,2); n = length(t...

8 years ago | 0

Answered
What is the difference between using the highpass() command and designing a Butterworth highpass filter?
The *|highpass|* function designs an elliptical filter. This is a computationally efficient filter with (in my opinion) good pa...

8 years ago | 0

| accepted

Answered
How to express this result in decimals ?
Use the <https://www.mathworks.com/help/symbolic/vpa.html *|vpa|*> (link) or <https://www.mathworks.com/help/symbolic/double.htm...

8 years ago | 3

| accepted

Answered
Importing data from text file with columns gives blank array
Without having the file, it is difficult to say. The first two header lines are commented out in your post. If they are presen...

8 years ago | 0

| accepted

Answered
How can I Plot a simple linear plot of sound pressure v/s frequency from an audio track?
Us e the <https://www.mathworks.com/help/releases/R2015a/matlab/ref/fft.html *|fft|*> (link) function. The full code would ...

8 years ago | 1

Answered
I have a matix of 117 by 4. I need to make it 160 by 4 by adding 43 rows of zeros.
Try this: M = rand(117,4); % Create Matrix M = [M; zeros(43,4)]; % Add...

8 years ago | 0

| accepted

Answered
Combining multiple tables with same variable
One option is <https://www.mathworks.com/help/matlab/ref/vertcat.html *|vertcat|*> (link), another is <https://www.mathworks.com...

8 years ago | 0

Answered
How to derive probabilities from density function?
It would probably be best to use the <https://www.mathworks.com/help/stats/fitdist.html *|fitdist|*> (link) function. It will g...

8 years ago | 0

| accepted

Answered
controlling the spread of contour lines
You can define the contour levels with a vector. *_Example_ —* % Function to plot contours x1=-5:0.1:5; x2=-5:0...

8 years ago | 1

Answered
Counting sEMG RMS Peaks
To get the peaks (and their locations and some other characteristics on them) use the <https://www.mathworks.com/help/signal/ref...

8 years ago | 0

| accepted

Answered
How to calculate heart rate from RR interval matrix?
Convert the R-R intervals into individual rates, then calculate the *|mean|*. *_Example_ —* RR_Vct = rand(15,1); ...

8 years ago | 0

| accepted

Answered
How to plot line spectrum in matlab ?
Use the <https://www.mathworks.com/help/matlab/ref/stem.html *|stem|*> (link) function for the plot. *_Example_ —* f ...

8 years ago | 0

Answered
Calculate the time derivatives for a signal envelope of burst signals (both width and height)?
I am not certain what you are doing. Two functions that could be appropriate are <https://www.mathworks.com/help/signal/ref...

8 years ago | 0

| accepted

Answered
Help reading data from CSV file?
Without knowing more, your best option (if you have *|R2013b|* or later) is to use the <https://www.mathworks.com/help/matlab/re...

8 years ago | 0

Answered
Index and sort through vector by only picking the values that are the same
The *|unique|* funciton can have *|3|* outputs, although you have to specifically request them. The third output is the index o...

8 years ago | 0

| accepted

Answered
How to plot rectangular potential in matlab
Your code appears to be correct. If you want the labels, try this: m=9.11E-31; U=5e-19; E=0e-19:0.001e-19:12e-19; ...

8 years ago | 1

| accepted

Answered
How to find the x and y values of a graph which is covered by a certain range?
Try this: x_Model_Mask = (x_Model >= min(x_Exp)) & (x_Model <= max(x_Exp)); % Logical Vector x_Model_Result =...

8 years ago | 1

| accepted

Answered
How to round a large array to the nearest factor of 0.0064
I am not certain what you want. Three options: A = rand(20,1); % Create Data R1 = rem(...

8 years ago | 0

| accepted

Answered
cell to matrix with numerical and logical values
Try this: C = {1:5, (1:6)>3}; % Create Cell Array N = cell2mat(C(cellfun(@isnumeric...

8 years ago | 0

Answered
common part of two vectors
Try this: A = [0 1 1 1 1]; B = [0 1 0 0 1]; Result = A & B Result = 1×5 logical array 0 ...

8 years ago | 0

| accepted

Answered
Band-Pass Filter using 2nd order butterworth filter then Normalize
You have to normalise the filter frequencies by dividing them by the Nyquist frequency. Fs = ...; ...

8 years ago | 0

| accepted

Answered
Band Pass Filter Design
If you have *|R2018a|* or later, you can use the <https://www.mathworks.com/help/signal/ref/bandpass.html *|bandpass|*> (link) f...

8 years ago | 0

Answered
How to make cylinder without cylinder function?
Depending upon what you want as a result, this can be straightforward. *_Example_ —* a = linspace(0, 2*pi); crcl =...

8 years ago | 0

| accepted

Load more