Answered
Table of functions for symbolic expressions
It is not exactly what you asked for, but I believe that it is close enough: close all clearvars syms x n ...

5 years ago | 0

| accepted

Answered
how to calculate the convolution of two signal without using CONV() ?
close all clearvars %x=input('Enter x: ') x=sin(2*pi*0.1.*(1:1:11)); %h=input('Enter h: ') h=[1 ...

5 years ago | 13

| accepted

Answered
With the instruction "h = firpm(n, f, a);", can you give example to show ho to determine the parameters n,f &a?
Help doc is clear enough. The only point that maybe causes a confusion you is the "order" n. So keep in mind that firpm(n...

5 years ago | 0

Answered
How to make cos function work only for short period then 0 of long period, and repeat?
I hope, this will help : clearvars; clc; close all; % simulation time step dt=0.001; % periods of ON and ...

5 years ago | 0

Answered
How to change the default x-axis unit in a Bode diagram to Hertz?
clc;close all; clc % test system s=tf('s'); H=(s-1)/((s-3)*(s-2)) % bode [mag,phase,wout] = bode(H); ...

5 years ago | 2

Answered
How to matlab z-transform of x(n)=((4/3)^n) u(1-n)
Symbolic math toolbox, calculates only unilateral z transform. So, we have to use some properties in order to calculate what you...

5 years ago | 0

Answered
step response from an equation
Use this: clear; clc; close all; % sympolic math toolbox syms s, num_planta=sym(1); %numera...

5 years ago | 1

Answered
How to matlab ztransform with time shift?
If you like to use <https://www.mathworks.com/products/symbolic.html symbolic math toolbox> : clearvars; clc; close all; ...

5 years ago | 0

Answered
Problem with inverse Fourier Transform of a known signal
Allow me to make an observation: when you perform ifft() upon signal Y in order to get time signal y2, it seems that Y is an "on...

5 years ago | 0

| accepted

Answered
how to plot the PDF of a random variable
From the integral that you use in order to calculate marginal PDFs, I guess that x,y are into the interval [0, +inf]. ...

5 years ago | 0

| accepted

Answered
How to enter a trajectory equation?
Here is my suggestion : clearvars; clc; close all; % definition of variables syms x y theta_0 v_0 g y_0 %...

5 years ago | 0

Answered
Why do I get "sin(t)^2" when I "int(sin(2*t))"?
Results of int(), are correct. Actually sin(t)^2 and -cos(2t)/2 differ only by a constant 1/2. <</matlabcentral/answer...

5 years ago | 1

| accepted

Question


when I run an m-file, Is there a way to "change current folder" to the folder that this m-file is placed, by means of some commands at the beginng of the file ?
I have a m-file, for example mytest.m and at the beginning of it , I would like to place a command (or commands), in order to "c...

5 years ago | 1 answer | 0

1

answer

Answered
how can i Calculate area of plotted data using trapz in matlab?
Before using trapz, do the following new_data(:,2)=new_data(:,2)-min(new_data(:,2)); this shifts all of your graph upw...

5 years ago | 1

| accepted

Answered
Problem with noisy gaussian function
You must use <https://en.wikipedia.org/wiki/Central_limit_theorem Central Limit Theorem> Bellow is an rough attempt of mine:...

5 years ago | 1

| accepted

Answered
Please help me with "is an invalid algebraic loop because of a self loop around the parent non-virtual subsystem"
You have to put some delay, at these three signals that goes from the output, directly to the input of the "MATLAB Function" blo...

5 years ago | 1

Answered
Fast Fourier Transform for csv file with multiple column
You must find Fsampling. You can achieve this by observing values of vector t. If t(k)-t(k-1) is the same for each 1<k<len...

5 years ago | 0

| accepted

Answered
How to send the value from test script(m file) to main m file which is not written as a function?
Write values of Modes into a file at your disk: save('fileModes.mat','Modes') then you can use load fileModes.mat...

5 years ago | 0

Answered
Conversion of complex number in to fixedpoint representation
An example: clear; clc; close all; % a complex number x=0.3435637634857634+1i*0.66735646778675; % paramete...

5 years ago | 0

Answered
fft of impulse response does not equal bode of transfer function
You have to change the time interval that you used to define stoerung_t Try a larger one: stoerung_t = [0 : stoerund_d...

5 years ago | 0

Answered
I want to find out intersection points of two circles in symbolic form. The two circles are C1: x^2+y^2=(r+a)^2 and C2: (x-(b-l/2))^2+(y-sqrt3 *L/2)^2=(r+a)^2. Can anyone help me?
When you will use it inside a loop with real values for a, b, l, L, r, maybe it is better to use vpasolve() instead of solve() ...

5 years ago | 2

| accepted

Answered
How to plot gt please help me ????
clear; clc; syms t g(x) x(t) g(t) = piecewise(-0.5<t<0,(2+4*t),0<=t<+0.5,(2-4*t), 0) x(t)=sym(0); fo...

5 years ago | 1

| accepted

Answered
Discrete FIR Filter help
1) Check the input. Is it "sample based" or it is a sample 2) Check how you watch the output 3) Of course you put the coef...

5 years ago | 0

Answered
Does anybody know how to generate a signal for this? T=0.01 seconds and sampling frequency = 10000Hz.
clear; clc; close all; % parameters T=0.01; Fs=10E3; Ts=1/Fs; % define base signal s= @(t) ((0<=t) &...

5 years ago | 0

| accepted

Answered
Square of 20 random number sum up to 1
clear ; clc; N=20; r=rand(1,N); normFactor=sqrt(sum(r.^2)); r=r/normFactor; figure; plot(r,'bo'...

5 years ago | 0

Answered
How to creat this filter
Your transfer function can be transformed in the following form: <</matlabcentral/answers/uploaded_files/131362/tf.jpg>> ...

5 years ago | 0

| accepted

Answered
finding slope of a signal
A script that calculates *mean slope* : clc; clear; close all; %% generate input signal x=0:1:1500; y=(-0.002*...

5 years ago | 1

| accepted

Answered
determination of e^x using Taylor series
clear; clc; syms A B x_1 x_2 x_3 syms a_1 a_2 a_3 %definition of equation myEq= A==B*exp(a_1*x_1+a_2*x_2+a...

5 years ago | 1

| accepted

Load more