Risposto
Evaluating a complex equation
Preallocate ‘Y’ as: Y=zeros(8,numel(t)); add a second dimension to ‘Y’ in the assignment to it: Y(n,:) = ... and add ‘t’ t...

circa 3 anni fa | 0

| accettato

Risposto
Why low pass filtering requires long duration time signals?
1. The problem with needing long signals is primarily due to using an FIR filter, since FIR filters are usually long in order t...

circa 3 anni fa | 0

Risposto
Concatenating Arrays end to end 1D
One option is to convert ‘Duplicates’ to a cell array (using num2cell) to make it compatible with the other values — Blank='-'...

circa 3 anni fa | 0

| accettato

Risposto
wny fft does't work with different signal?
Thbere is a farily significant D-C or constant offset in ‘data(:,2)’ and that hides all the spectral peaks of lower magnitudes. ...

circa 3 anni fa | 0

| accettato

Risposto
How to find the intersection values of line and curve?
Try this — % clc % close all d1 = 0.4;d2 = 0.6;d = d1 + d2; n1 = 3.46;n2 = 1.5; lambda = linspace(400e-3,800e-3, 100000)...

circa 3 anni fa | 0

| accettato

Risposto
color map with specific range
I used 'filled' here because otherwise the yellow points may be difficult to see — figure imshow(imread('tri.jpg')) x = 1:...

circa 3 anni fa | 1

Risposto
look up data from table (either from excel, table in matlab, or text fil) using App Developer
Another option for the lookup — Table = readtable('FluxDataInterpolated.xlsx'); inclination = Table{1,2:end}; altitude = Tab...

circa 3 anni fa | 0

Risposto
The least square with changing number of lines of matrix
I am not certain what you want. This calculates regressions on each column of ‘y’ and then plots it in the same colours as th...

circa 3 anni fa | 0

Risposto
Create a 3D plot with shadow length, altitude, and time.
Filling the inside of the 3D curve is straightforrward — run('shadecode.mlx') T1 = readtable('Shadedata.xlsx') t = T1.Time...

circa 3 anni fa | 0

| accettato

Risposto
Failure on combining 2 timetable
Experiment with the synchronize function to see if it will do what you want. EDIT — (21 Aug 2023 at 15:57) To illustrate —...

circa 3 anni fa | 0

| accettato

Risposto
System response from input and output signals
First, use the System Identification Toolbox (iddata then ssest and compare then lsim) or the Signal Processing Toolbox (invfreq...

circa 3 anni fa | 0

| accettato

Risposto
How to create nested legend
One option is to put each ‘h’ in a separate column — h = 300 : 75 : 525; w = 60 : 30 : 180; [H,W] = ndgrid(h,w); figure...

circa 3 anni fa | 0

| accettato

Risposto
Averaging data from seconds to three seconds because of different time variables
I am not certain that it is possible, however if it is, some combination of retime and synchronize could work. EDIT — (21 A...

circa 3 anni fa | 1

Risposto
How to make contour smooth
There are a few options, one being to plot fewer levels, and the second being to downsample the matrix using interp2 and also ch...

circa 3 anni fa | 0

| accettato

Risposto
Matlab figure: Replace xaxis with custom labels
Another approach — sun = sin((0:240)*pi/25).^2 .* exp(-0.015*(0:240)); figure plot(sun) figure plot(sun) xt = xticks;...

circa 3 anni fa | 0

Risposto
Interpolation using Excel Data
One approach — % C1 = readcell('FluxData.xlsx') T1 = readtable('FluxData.xlsx') xvar = T1{1,3:end}; yvar = T1{2:end,2}; ...

circa 3 anni fa | 0

| accettato

Risposto
Read excel file with Matlab
One option is to use the datetime 'ConvertFrom' name-value pair. For the ‘value’ argument, both 'excel' and 'posixtime' work, ...

circa 3 anni fa | 0

| accettato

Risposto
I hava wav file and need to plot spectrogram in matlab
The argument to spectrogram must be a vector. I suspect the error is that ‘y’ is a (Nx2) matrix, and that is throwing the error...

circa 3 anni fa | 0

Risposto
Nonlinear Regression using a gaussian in a lattice
One approach (using smaller matrices for efficiency and to demonstrate and test the code) — syms a sigma dr = sym('dr',[3 3]...

circa 3 anni fa | 0

| accettato

Risposto
Why is NaN inserted in wrong position?
It should not do anything, because 5 is in row 2, not row 1. That aside, you need to index into ‘b’ correctly to get the desi...

circa 3 anni fa | 1

| accettato

Risposto
passing filenames to a dos command
See if the system function will do what you want. Also, see Run External Commands, Scripts, and Programs for a more extensive...

circa 3 anni fa | 0

Risposto
how can I plot the contours inside not outside?
What result do you want? Try this — figure F = openfig('untitled.fig'); Lines = findobj(F, 'Type','line'); for k = 1:nume...

circa 3 anni fa | 0

Risposto
how to include symbol on plot line into the legend?
The code plots two lines, however has only one legend entry, so the second series (with the '<' marker) does not show up in the ...

circa 3 anni fa | 0

Risposto
How to quickly group numerical data without giving bin sizes
I am not certain that there is a robust approach to this sorts of problem. For multivariable problems (each point is a vector d...

circa 3 anni fa | 0

| accettato

Risposto
Finding similar rows with different I and M columns and create an average of them
Experiment with the unstack function to see if it will do what you want. (The necessary information is missing, so I cannot run...

circa 3 anni fa | 0

| accettato

Risposto
How to plot LTspice graph in Matlab in this case?
One approach — T1 = readtable('final_all1.txt', 'VariableNamingRule','preserve') T1.MagdB = str2double(extractBetween(T1{:,...

circa 3 anni fa | 1

| accettato

Risposto
How to obtain the values of R, L and C of a series RLC model of experimentally obtained frequency domain response data in MATLAB?
This is ‘circuit synthesis’ and it is (unfortunately) not trivial. A series RLC model: >--- R - L - C ---> Vin ...

circa 3 anni fa | 0

| accettato

Risposto
Genetic Algorithm (ga) terminating after a few generations
That is certainly consistent if it converges quickly, and especially if it produces a reasonable result. If your 'InitialPopul...

circa 3 anni fa | 0

| accettato

Risposto
Help with jumping one position using circshift function in a for loop
The circshift function does not duplicate any values, so I don’t understand how you expect to get the ‘Tn’ matrix at the end. ...

circa 3 anni fa | 0

| accettato

Risposto
I'm trying to make an image with data from a .txt file
Use readmatrix to read the file. To display the image, then do something like this — % writematrix(rand(80,10),'YourFile.tx...

circa 3 anni fa | 1

Carica altro