Answered
How remove overlapping spaces between positive and negative above and below the x-axis respectively using an area plot in MATLAB?
hi so this is my submission - it took me a while to finalize it, I am not really the top notch expert in figure rendering. An...

6 years ago | 0

Answered
How to create 2x2 array containing elements?
hi this is quite straitghforward : C{1,1} = 'my cell'; C{1,2} = [9 0 3; 2 5 6; 7 81 6]; C{2,1} = 3 + 6i; C{2,2} = [1 4;...

6 years ago | 2

| accepted

Answered
how to identify values in a text file and replace them based on an existing array
hello this is a way to do it T = readtable('data.txt'); % T = % % 14×2 table % % Var1 Var2 % _____...

6 years ago | 0

Answered
Find all occuarances of two numbers together
hello Inna you have to test a vs [1 0] and not [0 1] this is the code : a = [ 0 -1 1 0 0 -1 1 0]; t = [1 0]; ind = findstr...

6 years ago | 0

Answered
Resize the images without deforming them
so I modified your code so that the shortest dimension of your input image will be resized to 100 pixels If your input image is...

6 years ago | 0

Answered
why is my PID doing this
hi I found that you have too much loop gain and therefore your are unstable - maybe before closing the loop you should look a...

6 years ago | 0

| accepted

Answered
How to write a function that takes an interval [a,b] and a function f(x) and computes the integral of f(x) from a to b using the Trapezium rule.
hello refer to trapz and cumtrapz functions example below a = 0; b = pi/2; x = linspace(a,b,100); y =sin(x); out_inte...

6 years ago | 0

Answered
Inverse hyperbolic fit to data
hi below the code that solve your problem using fminsearch P = [5 7.5 10 12.5 15 17.5 20 25 30 35 40 45 50 55 60 65]; ...

6 years ago | 1

| accepted

Answered
I want to plot current data (direction and magnitude) as vectors in a single plot
hello Heidi below some code with quiver vs feather display. depneds of your preferences - seem I got better angular rendering w...

6 years ago | 0

Answered
Speech Signal Analysis using IIR filters
hello your code is about frequency analysis (FFT) and not filtering time series. ... so what is the purpose of bandpass filter...

6 years ago | 0

| accepted

Answered
How to create a Butterworth filter from scratch?
hello please consider this audio digital filter cook book you should be able to find the filter you need. all the best ...

6 years ago | 0

Answered
How to use the same equation to get shapes of different sizes and locations.
hi this is my suggestion radius = [40 25 15]; CenterX = [0 0 0]; CenterY = [40 105 145]; for ci = 1:length(radius) [x...

6 years ago | 0

Answered
Power spectrum of time series
hello it seems that your time data is quite long (~10^5 samples ) , and you are doing just a single buffer fft computation ? y...

6 years ago | 0

Answered
Problem sending signals from Simulink to workspace
Hi Flavio just a fews minor bugs 1/ your x and y are not initilaised , by default your integrator blocks IC are set by defaul...

6 years ago | 0

| accepted

Answered
How to reduce precision of digit after decimal point? Matlab (R2020a)
hi dirty trick , example to round to 2 digits after decimal : aa = 0.01*round(a*100) example : 0.01*round(pi*100) ans = ...

6 years ago | 1

Answered
Regarding logarithmic chirp signal
hi simple demo below : % log sweep demo f1 = 50; % start freq f2 = 200; % stop freq Fs = 1e3; % sampl...

6 years ago | 1

Answered
How to plot complicated exponential function 4.82 (1 + 0.35 e^ −4.07t ) / (1 − 0.35 e^−4.07t) on matlab
your y output is a scalar because your division is / and not ./ so this works : x = 0 : 0.01 : 10.00; y = ((4.8184) * (1 +...

6 years ago | 1

| accepted

Answered
Data exceed the computer memory
hi why not simply do a moving average of your data ? help movmean https://www.mathworks.com/help/matlab/ref/movmean.html

6 years ago | 0

Answered
Assign values of .mat files into matrix
hello seems all your mat file contains the same size of data so the modification of you r code is fairly simple - if I under...

6 years ago | 0

Answered
Low pass filter for amplitude modulation
hi my suggestion below (tested OK) dt = 1e-4; Fs = 1/dt; t=0:dt:0.5; f=5; y=sin(2*pi*f*t); subplot(3,1,1) plot(t,y) h...

6 years ago | 0

Answered
Lowpass doesn't work as expected
hi modofied a bit your code - I did not use designfilt but otherwise your code seems to work just replaced your FIR filter wi...

6 years ago | 0

Answered
Merging xlsx data with different lengths
hi see : https://www.mathworks.com/help/matlab/import_export/read-spreadsheet-data-into-table.html then you can build on th...

6 years ago | 0

Answered
How to add offset to image?
Hi my 2 cents suggestion. Main problem is that the first image (h) and your noise amplitude in the second had amplitudes wi...

6 years ago | 0

| accepted

Answered
How can i obtain intersection values of dataset graph with the constant line y=0 ?
hello see demo and function attached enjoy !

6 years ago | 0

| accepted

Answered
Add a legend in a plot with multiples lines
hi simplest code below - more sophisticated is always possible... % simple code load psi_20.mat load time_20.mat psi_20 =...

6 years ago | 1

| accepted

Answered
How to load multiple *.mat files in a directory into individual 271x1 vectors. Not structures. Need them named dynamically. Don't crucify me.
Hi though I am not really an expert in this kind of field, I did long time ago something in that area . don't know, but maybe i...

6 years ago | 0

Answered
funtion to convert value to string
hi yiu have conditions that could be met simulteanously to avoid overlap in condition domains , I suggest : if p <= 0.01 a...

6 years ago | 0

| accepted

Answered
How can I find the position vector associated to an indice with the find function?
A and B must be of same size - then find can return row and col indices example : A = 0.9501 0.8913 0.8214 0...

6 years ago | 0

| accepted

Answered
plotting in a for loop
hi see modified code zeta= [-.02,0,.05,.2,1,2]; omegan=2*pi; num=[omegan^2]; tfinal=4; numpts=201; time=0:tfinal/(n...

6 years ago | 0

Answered
How to read multiple .png images in a loop using MATLAB
hi see below - just change from tif to png extesion and you should be good ! % select appropriate options below ... % fil...

6 years ago | 0

| accepted

Load more