Réponse apportée
How to Find value inside a matrix that satisfies a condition and store that value in column 1 its corresponding row in column 2 and its column in column 3
hello sounds bit like a homework..? here your are : A = rand(5,5) [r,c] = find(A>=0.25 & A <= 0.5); for ci = 1:numel(...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how to calculate sum between cell
hello see example below : % example data for ci = 1:3 A{ci} = rand(1,7); end % do a horizontal sum B = sum(cell2m...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to normalize signal to have mean=0 and amplitude 0 to 1
hello if you are not confident how to use normalize , you can do the same thing by x = x - mean(x); % remove mean value (you...

presque 5 ans il y a | 1

Réponse apportée
how to write a loop that finds the best fit value for each given input pair and plot all the resulted points?
hello Anitha so yes there was a small bug in your equations when you do the computation of A, you fliiped the terms (vs1.^2...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to plot a marked point in a graph and connect it with other points?
hello this is a first attempt the outer lines was fairly easy to plot the two inner lines , it's a bit coded just to show ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Load matrix from .mat files
hello try this : data_all = []; for ci = 1:10 filename = ['P' num2str(ci-1) '.mat']; data = load(filena...

presque 5 ans il y a | 0

Réponse apportée
how to solve error using integral
hello integral works on function (handles) not arrays f is an array , not a function handle so use trapz to do numerical int...

presque 5 ans il y a | 0

Réponse apportée
I have m*n matrix. I want keep only those rows whose atleast one element is greater than any specific value such as 1.
hello try this m = 3; n = 5; A= 1.15*rand(m,n); threshold = 1; a = A>threshold; rows = find(any(a, 2));

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Sum specific elements of an array without using loop
hello Alex try this A = [1;0;0;0;0;1;1;1;0;0;0;1;1;0;0;0;0;0;0;1;1;1;0;0;1;0;0;1;0;0]; % 30x1 Array tic res = zeros(1,10);...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Half Power Method for Vibroacoustic Dataset
hello Daniel the frequency vector is missing the half power method is described here : Microsoft Word - 41FC527E-54FA-00270...

presque 5 ans il y a | 1

Réponse apportée
How to calculate the response time of an instrument based on a second?
hello Kofial I did a few mods in your code ... but the response data of the instruments has little to do with the graph of the...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
There is an apparent error in line 4, and this code only ran once
hello simply b and m are not yet defined when you do in line 4 : c2 = b*exp(t2*m); the code should be organized like this ...

presque 5 ans il y a | 0

Réponse apportée
How do I output the values of a function in a vector string to plot a graph?
hello maybe this ? (tested OK on my side) clc clearvars A = 1; df = 100000; F = df/4; % n = 2^3; n = 2 ^ 3: 2^ 4 : 2 ^...

presque 5 ans il y a | 0

Réponse apportée
Curve Fitting Tool - Power Fit
hello even without the curve fitting toolbox you can get a good match using fminsearch : sol = 1.4912 0.2802 clc...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
readcell command undefined?
hello again Amit i think I recognize this line of code... :) I believe readcell was introduced around R2018 - so if you have...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how to find the sample space of two or more peaks within a power delay profile
hello again this would be my suggestion to pic the two highest peaks inside each data bins , which are distant at least by 4 sa...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to plot my sine waves in one graph, one right after another with 100ms in between and not on top of each other?
hello Kristin I fixed your code I prefered to use a constant fixed time increment for all frequencies instead of keeping the s...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Running a loop to generate multiple graphs using the same equation with different parameters
hello yes your code could be made more compact and flexible see my suggestion below clc clearvars t = linspace(0,5); ...

presque 5 ans il y a | 2

| A accepté

Réponse apportée
Identification of fundamental frequency and not harmonics in a FFT - using peak locations
hello try this of course I cannot plot the spectrum as this is not provided here I just let you see how to do the separati...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to make an if-statement that finds whether a 1x5 column has 4 of the rows the value 0?
hello my suggestion below : matrix = [0 0 0 241 0]; ind1 = find(abs(matrix) == 0); % method 1 can be unpredictabe if val...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Arrange average in same vector values
hello try this %% dummy data B = ([1 1 1 1 2 2 2 4 4 4 4 1 1 1 1 2]/8)'; % 2nd column data A = 100*rand(size(B))'; ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Intergrating the data using a scalar value
hello see the doc for cumtrapz I believe you simply put the arguments in the wrong order it must be Int1 = cumtrapz(V,A1)...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
easy and efficient way to create cell array or table from csvs or existing variables
hello this is my 2 cents suggestion clc clearvars %% first section : CSV file management fileDir = pwd; % Sorting ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
For looping figures creation
hello see example code below for listing and sorting filenames in natural order (what matlab does not do well by default) in ...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Reading a text file and then loop load audio files
hello again so this script will read the txt file where you have a list of wav file names then the loop will open the associ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
creating sine wave with variable frequency depending on variable
hello this is my suggestion - see attachement (R2020b) code for initialization : Fs = 1000; dt = 1/Fs; % angular table...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
IIR Filter for loop Code
hello if you want to simply plot the bode diagram : Fs = 1000; % assumed for now ...sampling frequency b0 = 0.05 b1 = 0.03...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to convert accelerometer data to find displacement graph
hello see my suggestion below clc clearvars data = csvread('data.csv',1); % time & Acceleration data t = data(:,1)...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how to read data from excel file
hello your csv file has one first row wit this header (name of 6 variables : lib,pc,ir_can,ir_us,un_can,un_us) data = csvrea...

presque 5 ans il y a | 1

Charger plus