This is my blog:

https://math2tech.blogspot.com

Answered

Testing a digital filter with White Noise

Hi Krishna Your test, although primitive, gives a first feeling of how the filter performs. But I must highlight two points T...

Testing a digital filter with White Noise

Hi Krishna Your test, although primitive, gives a first feeling of how the filter performs. But I must highlight two points T...

5 meses ago | 0

Answered

My diff function won't work and I'm not sure why

I think , the answer to your problem is the following piece of code: clearvars; clc; close all; % call of the function myVa...

My diff function won't work and I'm not sure why

I think , the answer to your problem is the following piece of code: clearvars; clc; close all; % call of the function myVa...

6 meses ago | 0

Answered

My diff function won't work and I'm not sure why

Try this : clearvars; close all; clc; syms x q(x) = exp(2*sin(x)) - x; f(x) = q(x) dq(x) = diff(q(x)); g(x) = dq(x) dq2...

My diff function won't work and I'm not sure why

Try this : clearvars; close all; clc; syms x q(x) = exp(2*sin(x)) - x; f(x) = q(x) dq(x) = diff(q(x)); g(x) = dq(x) dq2...

6 meses ago | 0

Answered

Use variables from workspace from previous run

There are two possible scenarios: your matlab code overwrites some of the preloaded values you "load" the files inside the fu...

Use variables from workspace from previous run

There are two possible scenarios: your matlab code overwrites some of the preloaded values you "load" the files inside the fu...

6 meses ago | 0

Answered

How to derive the following equation? I need this for a script that I am working on.

Mr Legend You question regards your math's homework and not matlab, but I liked your profile's name "the Legend", and I 'll giv...

How to derive the following equation? I need this for a script that I am working on.

Mr Legend You question regards your math's homework and not matlab, but I liked your profile's name "the Legend", and I 'll giv...

7 meses ago | 0

| accepted

Answered

5 equations with 5 unknowns

Run this and check if the equations are those that should be... clearvars syms Vmp Voc Isc mp k q T Rp0 Rs0 Imp s...

5 equations with 5 unknowns

Run this and check if the equations are those that should be... clearvars syms Vmp Voc Isc mp k q T Rp0 Rs0 Imp s...

8 meses ago | 0

| accepted

Answered

Not getting single frequency signal...

Hi Hari You can use the following algorithm: clc; clearvars; close all; %% definition of frequencies fc=500; f_delta=100;...

Not getting single frequency signal...

Hi Hari You can use the following algorithm: clc; clearvars; close all; %% definition of frequencies fc=500; f_delta=100;...

9 meses ago | 0

Answered

I need to solve an equation involving squares and cubes.

It is a 3rd order equation, it has only an analytical solution. You can use the following code: clc; clearvars; syms p ...

I need to solve an equation involving squares and cubes.

It is a 3rd order equation, it has only an analytical solution. You can use the following code: clc; clearvars; syms p ...

9 meses ago | 0

| accepted

Answered

Count the number of intersections between any two curves

If you have two functions y=f(t) and y=g(t) you can find their intersections by solving the equation f(t)=g(t). But such a thin...

Count the number of intersections between any two curves

If you have two functions y=f(t) and y=g(t) you can find their intersections by solving the equation f(t)=g(t). But such a thin...

9 meses ago | 0

Answered

How can I determine conditions and interpolate where necessary?

Stelio A good solution for you problem is to use polynomial interpolation. Have a look here: https://www.mathworks.com/matl...

How can I determine conditions and interpolate where necessary?

Stelio A good solution for you problem is to use polynomial interpolation. Have a look here: https://www.mathworks.com/matl...

9 meses ago | 0

Answered

Inverse laplace - symbolic tool box

I had a look at your file. The definition of the laplace transform A contains a syntax error. It has an extra "=" without mea...

Inverse laplace - symbolic tool box

I had a look at your file. The definition of the laplace transform A contains a syntax error. It has an extra "=" without mea...

9 meses ago | 0

| accepted

Answered

x^2 + y^2 =9

This equation depicts a circle with radious 3. clc; clearvars; syms x y eq= x^2+y^2==9 fimplicit(eq, [-3 3]); xlab...

x^2 + y^2 =9

This equation depicts a circle with radious 3. clc; clearvars; syms x y eq= x^2+y^2==9 fimplicit(eq, [-3 3]); xlab...

9 meses ago | 0

Answered

Area under the curve

Change the last section of your program to this: %% Sizing Capacitor Cf; %capacitor fundamental current for "a" phase is all t...

Area under the curve

Change the last section of your program to this: %% Sizing Capacitor Cf; %capacitor fundamental current for "a" phase is all t...

10 meses ago | 0

| accepted

Answered

Plotting equation for certain values

Have a look on matlab help files about the following functions: tf : how to define a transfer function on s or z plane bodepl...

Plotting equation for certain values

Have a look on matlab help files about the following functions: tf : how to define a transfer function on s or z plane bodepl...

10 meses ago | 0

Answered

how to use Subscript in for loop

What is Tr [ ] at your mathematica code ? Is it an array or a function (I am asking because I 've no experience on mathematica...

how to use Subscript in for loop

What is Tr [ ] at your mathematica code ? Is it an array or a function (I am asking because I 've no experience on mathematica...

10 meses ago | 0

Answered

How can i save two points with lambda in a vector ?

Run this: clear; clc; close all; %input points Points=[1 1; -1 1; -1 -1; 1 -1 ]; % make 'Points' to represent an close...

How can i save two points with lambda in a vector ?

Run this: clear; clc; close all; %input points Points=[1 1; -1 1; -1 -1; 1 -1 ]; % make 'Points' to represent an close...

10 meses ago | 0

Answered

how to find inverse

Generally, you must have in mind that : Taking that under consideration you can use the following piece of code clear; clc; ...

how to find inverse

Generally, you must have in mind that : Taking that under consideration you can use the following piece of code clear; clc; ...

10 meses ago | 0

Solved

the average value of the elements

Calculate the average value of the elements in the array

10 meses ago

Answered

how to find H(e j(ω π) ) if you know H(e j(ω), you found out H(e j(ω) by using freqz

Keep in mind that, is a periodic function of , with period . Have a look at the following figure. Focus on the "blue" and the...

how to find H(e j(ω π) ) if you know H(e j(ω), you found out H(e j(ω) by using freqz

Keep in mind that, is a periodic function of , with period . Have a look at the following figure. Focus on the "blue" and the...

10 meses ago | 0

Answered

Generate Random Number inside a closed area

Run your code many times and store the resulting point ( variable Point) into a file. Then every time you need a random point fr...

Generate Random Number inside a closed area

Run your code many times and store the resulting point ( variable Point) into a file. Then every time you need a random point fr...

10 meses ago | 0

Answered

Is there a way to choose what file to open in the command window using input(prompt)?

You can use uigetfile command: disp( "What is the file address to the first city?"); [firstcity,path] = uigetfile('*.txt'); ...

Is there a way to choose what file to open in the command window using input(prompt)?

You can use uigetfile command: disp( "What is the file address to the first city?"); [firstcity,path] = uigetfile('*.txt'); ...

10 meses ago | 1

| accepted

Answered

how to represent approximate equal symbol

A suggestion : while a > 4090 && a <5010 % your code end In fact "approximately" is something relative and depen...

how to represent approximate equal symbol

A suggestion : while a > 4090 && a <5010 % your code end In fact "approximately" is something relative and depen...

10 meses ago | 0

Answered

Undefined Function or Variable

I think there is a typo at the formula that calculates R : Something is missing there. Maybe a + or * mark By the way, ca...

Undefined Function or Variable

I think there is a typo at the formula that calculates R : Something is missing there. Maybe a + or * mark By the way, ca...

10 meses ago | 0

| accepted

Solved

Create a "+" flag

Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

10 meses ago

Answered

Compute probability of different states in a binary distribution

clc; clearvars % input data N=300; % always even x=randi([0, 1], N, 1); % two bits words % 00->0 , 01->1 , 10->2 , 11-...

Compute probability of different states in a binary distribution

clc; clearvars % input data N=300; % always even x=randi([0, 1], N, 1); % two bits words % 00->0 , 01->1 , 10->2 , 11-...

10 meses ago | 0

| accepted

Answered

Zeroing out particular frequency in audio signal

I'm giving you some tips: 1) Use high order FFT/IFFT . For example 8192 or even higher. 2) You have to filter out (by setting...

Zeroing out particular frequency in audio signal

I'm giving you some tips: 1) Use high order FFT/IFFT . For example 8192 or even higher. 2) You have to filter out (by setting...

10 meses ago | 0

Answered

Probability Density Function ??

First you have to import data from your excel file After that, you can calculate your PDF function, following this example: c...

Probability Density Function ??

First you have to import data from your excel file After that, you can calculate your PDF function, following this example: c...

10 meses ago | 0

Answered

Filter with given group delay and frequency response

One choice is to use a block called Arbitrary Response Filter A second choice could be the usage of a simulink block called Dig...

Filter with given group delay and frequency response

One choice is to use a block called Arbitrary Response Filter A second choice could be the usage of a simulink block called Dig...

10 meses ago | 0

| accepted

Answered

problems with ifft of bandpass filtered white noise

Hi Anna. Pay attention to these lines of your code: n = 2^nextpow2(L); Y = fft(X,n); Because n>L, matlab adds some zeros at ...

problems with ifft of bandpass filtered white noise

Hi Anna. Pay attention to these lines of your code: n = 2^nextpow2(L); Y = fft(X,n); Because n>L, matlab adds some zeros at ...

10 meses ago | 1

| accepted

Answered

Simple fixed-point iteration method

Dear John Put your function into the same folder with the program (m-file) that calls it.

Simple fixed-point iteration method

Dear John Put your function into the same folder with the program (m-file) that calls it.

11 meses ago | 0

| accepted