Respondida
Problem using biquad filter object
Even better, I would use filtfilt function in order to have zero lag: clc;clear all; Fs=44100; Ts=1/Fs; t=0:Ts:0.2;% to beete...

alrededor de 3 años hace | 0

Respondida
Plot structure in 3D coordinate
This slight modification is to get you going into right direction. function[structplot] = plotstruct(coord, ends) %input: ...

alrededor de 3 años hace | 1

| aceptada

Respondida
Accumulating values for different people
Let's say you have an input data file named 'inputData.txt' with the following structure: $12,00 Josh $27,00 Sophie $18,00 Je...

alrededor de 3 años hace | 0

Respondida
filling a matrix with outcomes of a for loop
Is this something you're looking for? N = 10; R = zeros(4,1); D = zeros(4,N); for n = 1:N R = normrnd(40,7,[4,1]); ...

alrededor de 3 años hace | 1

| aceptada

Respondida
Energy and Power of a Piecewise Function
This is how I would do it and how it seems natural to me. It doesn't make sense to perform integration based on theoretical defi...

alrededor de 3 años hace | 0

Respondida
Determine -3db gain on Freq- gain plot
I think this code can help you, it is something I often use. It is not most efficient, but it works. Please have a look at the ...

alrededor de 3 años hace | 0

Respondida
Battery nominal capacity estimation using Coulomb Counting
Hello Mateo, I don't think there is a problem in your code. It seems that you used correct way to perform numerical integration...

alrededor de 3 años hace | 0

| aceptada

Respondida
Battery nominal capacity estimation using Coulomb Counting
Try to add the following line immediately before lsqnonlin call rng default I cannot test it myself, because your function use...

alrededor de 3 años hace | 0

Respondida
Good afternoon, I am receiving errors in MATLAB when plotting and I cannot figure out seeing what is wrong with my code
Use normal arrays and not cell. % either this plot(cell2mat(x_coordinates), cell2mat(y_coordinates)); % or x_coordinates ...

alrededor de 3 años hace | 0

Respondida
Filter() command is not passing through sine wave
You do understand that "input = sin(2*pi*1000*n/48000) (n equals 1 for this set of variables) " means input is not sine wave b...

alrededor de 3 años hace | 0

Respondida
How to code integral of product of lognormal variables?
Please have a look at how this example would be solved in Matlab: syms x y z; f = @(x,y,z) 2*x.*exp(y).*sin(z); % define the...

alrededor de 3 años hace | 0

Respondida
why do i get this error as no enough input arguments
You're probably executing this code as a Matlab script. You need to make a function call. This code should be saved in a separa...

alrededor de 3 años hace | 0

Respondida
Generating a square mesh
If you look at the examples in the Matlab documentation for the mesh function, you can find something like this: [X,Y] = meshgr...

alrededor de 3 años hace | 0

| aceptada

Respondida
Error in line 12. I cant use 'inline' command. How to fix it? There are 3 iterations. Equation is f(x)= e^-x-x and the derivative is -e^-x-1. Using Newton Raphson Method
Try this: format short clear clc syms x % Write the function here % f= @ (x) exp(1)^-x-x; f = @ (x) exp(1)^-x-x; df = d...

alrededor de 3 años hace | 0

Respondida
Adjust the Motion Speed of animate Option in ezplot3
ezplot3 is not recommended function to use in Matlab any more. There are other, maybe not that elegant ways of making animatio...

alrededor de 3 años hace | 0

| aceptada

Respondida
How can I add a space below the title?
If you need to add space below your title, you can add newline, something like this: title(['T (^oC),' ' Time = ',num2str(times...

alrededor de 3 años hace | 0

Respondida
Exceed array bound at position 2
This is your problem: for i = 1:cols for j = 1:rows m01 = m01 + j * Iin(i,j) / 255; end en...

alrededor de 3 años hace | 0

| aceptada

Respondida
Error during integration after differentiation
Perhaps, this is what you asked for: f = @(x,y,z) x.*y.^3.*z.^3; % define the input function syms x; g = diff(f,x); % use ev...

alrededor de 3 años hace | 0

Respondida
How to take the average every 4 data points?
Just in case if you want to calculate mean/average of the elements in the last chunk (partition) that contains less that 4 eleme...

alrededor de 3 años hace | 1

Respondida
Arrange clustered rows based on their label value
Hello Elysi, maybe I'm missing something here, but according to your code, you partition input data into 8 clusters, but your Y...

alrededor de 3 años hace | 0

| aceptada

Respondida
What is wrong with my code?
Execute command: [r,c] = size(hammer_data16) To see actual dimensions of the matrix hammer_data16 and then you'll see where th...

alrededor de 3 años hace | 0

Respondida
about psd estimation by FFT
It is because of Parseval's theorem, which expresses the energy of a signal in time-domain in terms of the average energy in its...

alrededor de 3 años hace | 0

| aceptada

Respondida
step signal at specific time
You might want something like this: value = 0.8; occ_points = [0.2, 0.5, 0.7, 1.3]; t = 0:0.01:2; y = value * ones(size(t));...

alrededor de 3 años hace | 1

Respondida
Understanding the train/validation and test set.
Hello Bob, I don't think that anyone could explain this better than Andrew Ng himself. Please have a look at this YT video: ht...

alrededor de 3 años hace | 1

| aceptada

Respondida
Why the regexp returns wrong result?
Because you have a match, for example, for the first element: X2300IF_S1 Did you perhaps want: '^X.*2$' so that 2 must be...

alrededor de 3 años hace | 1

Respondida
how to do coordinate transformation around a fixed axis using robotics toolbox or spatial math toolbox?
Hello Daniel, I suggest you to look in the book "Modern Robotics" by K. Lynch and F. Park, which is available online for free. ...

alrededor de 3 años hace | 0

| aceptada

Respondida
Cannot get the plot to work
Please use " toggle code" option when posting Malab code. It looks better. The reason you're not getting what you expect is tha...

alrededor de 3 años hace | 0

Respondida
Please this code says Error using plot. Vectors must be the same length. Error in untitled2 (line 8) plot(I,V,'0');
It is because I has 11 elements and V has only 10 elements. Thy should have the same number of elements to plot them as (x,y) pa...

alrededor de 3 años hace | 0

Respondida
I know a car's starting speed and deceleration rate. How can I calculate the stopping time in the code?
Well, your deceleration rate is not constant and what I see from the code it starts with -0.4237 m/s^2 and ends with -0.3 m/s^2,...

alrededor de 3 años hace | 1

| aceptada

Respondida
How can I fix "Index in position 2 exceeds array bounds" in for loop ?
This is because you're not using length correctly. In fact it is not a good idea to use length when working with matrices. In y...

alrededor de 3 años hace | 0

Cargar más