Beantwortet
How to plot a line of zero value on a surface?
Use contour3 to draw the boundary (here a red line with 'LineWidth',5) — LD1 = load(websave('Y','https://www.mathworks.com/m...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
I get complex numbers when I manipulate an FFT spectrum
The easiest way to do this is with a bandstop or notch filter in the time domain. If you must do it in the frequency domain, ...

mehr als 3 Jahre vor | 0

Beantwortet
FUNCTIONS IN GENETIC ALGORITHM
‘Can I apply the Genetic Algorithm to a fitness function that calls other functions?’ Yes. ‘and global variables are a p...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Is it possible to obtain the initial data after "smoothdata" function?
In general, no. Smoothing involves filtering of some sort, and that removes the higher-frequency details of the original sign...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Finding x-intercept in a 2d plot shown below, there are multiple loops I want to find all the values of X at Y=0...Please help..
Something like this should work — %Finding X value with known Y value on plot t = linspace(0, 2*pi, 1000); ...

mehr als 3 Jahre vor | 0

Beantwortet
I want to delete part of a row in an array but it kept returning an error
This cannot be done with a numeric array, however it can be done with a cell array. The disadvantage is that it must be kept ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How can I plot 2D surface plot with color bar
It is possible to create a surface plot from it, however it is probably not worth the effort — T1 = readtable('https://www.mat...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to re-scale an axis
Try something like this — x = linspace(0, 2E6, 2E6); y = sin(2*pi*x/1E6); figure plot(x, y) figure plot(x, y) xt = g...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
comparing between two cell arrays
I am not certain what result you want. Try this, and if it works, loop through the elements of ‘A’ and ‘B’ for all the necess...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How I can impliment my objective function inside this GA?
Since ‘objective function’ implies curve fitting, try something like this — x = 1:0.1:10; y = 2.5*exp(-(x-5).^2/2)+randn(size...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to extract X value given Y value from graph.
%Finding X value with known Y value on plot clc; clear all; close all; x= 0:0.01:5; y= [0.2 0.4 0.7 0.9 1.0] [X, Y] = mesh...

mehr als 3 Jahre vor | 1

Beantwortet
I need to make the vectors the same length
One option is interp1 — x = 1:9 y1 = randi(9, 1, 5) y1_new = interp1(linspace(min(x), max(x), numel(y1)), y1, linspace(mi...

mehr als 3 Jahre vor | 0

Beantwortet
Simulate and plot Butterworth filter frequency response using transfer function
If you want to see the frequency response, use the bodeplot function — R = 10; L1 = 10; L2 = 10; C = 1; ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
how can you loaded time series data, dependent and independent data in excell file?
I usually use readtable for such problems. It has the advantage of importing everything as well as the column headers.

mehr als 3 Jahre vor | 0

Beantwortet
Error with simultaneous differential equations
The problem is that ‘t’ is not a function (and shouldn’t be one), so ‘t(0)’ is interpreted as an array reference. Compounding t...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
precision of function: UNIQUE
That they are not monotonically increasing is not the same as their not being unique. That is a different problem. If you kn...

mehr als 3 Jahre vor | 1

Beantwortet
find the value of K for the first positive (real-number) value of R
One approach — G1=tf([3],[4 5 5 1]); figure rlocus(G1) [R,K]=rlocus(G1) Rfin = isfinite(real(R(1,:))); Kv = interp1(r...

mehr als 3 Jahre vor | 0

Beantwortet
How to get the Z-Axis of power spectrogram?
To see it in 3D, use the view function and choose an appropriate azimuth and elevation. (It was a surf plot in earlier release...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab R2022a: Are all prediction models available in Matlab?
Search the online documentation (and your own Help Center Browser) for predict. This links to the first one that shows up, an...

mehr als 3 Jahre vor | 2

Beantwortet
Need help with contour plot
Because the length of ‘Z1’ is thelength of the product of the lengths of ‘X’ and ‘Y’ it may simply be necessary to reshape it to...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
randomly sample a pair of values in a double
‘I need to RANDOM sample one of the coordinate pairs inside the coord_iso. how can I do?’ One option — RandomRow = randi(si...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can i simulation this Question
The randn function will produce Gaussian distributed random numbers with a standard deviation of 1. Your assignment says: ‘un...

mehr als 3 Jahre vor | 0

Beantwortet
Error using DynamicSystem/lsim
Instead of: % Define u(t) u = 1; use: % Define u(t) u = ones(size(t,2),1); Then, it works — % clc % Define the matric...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
using trapz in a for loop
The problem: for i=1:length(n) This returns 1 since ‘n’ is a scalar. You probably intend: for i=1:n however that is sti...

mehr als 3 Jahre vor | 0

Beantwortet
Scaling a graph in MATLAB
It would likely be more appropriate to use stackedplot (or subplot or tiledlayout) for this. Presenting each in separate axes w...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
plot a real EEG data save as csv file
Use readtable and then select the appropriate variables rather than using table2array. Without knowing more about the cell arra...

mehr als 3 Jahre vor | 0

Beantwortet
Generate Filters coeffitients using *.m file
If I understand your question correctly, the filter coefficients are the ‘h’ vector. Also, use filtfilt for the best results,...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
I am doing gait analysis. I suppose the black labelled ones are the steps, what is the red labelled ones? The sensor is placed on the thigh, what might cause this?
We’d have to know more about the instrumentation. It’s likely that the red regions are heel-strike and associated thigh-muscl...

mehr als 3 Jahre vor | 0

Beantwortet
Wrong plot upon right calculation
If it needs to begin at (0,1), the only changes required are that in the ‘K’ assignment, the current value of ‘f1’ needs to be r...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can i use intersect function correctly ?
Use calls to interp1 in a loop to get each intersection — f=@(x)1+cos(x); g=@(x)sin(x); fg = @(x) f(x)-g(x); x=-8:.01:8; A...

mehr als 3 Jahre vor | 3

| akzeptiert

Mehr laden