Réponse apportée
ismember and if not working
Please refer to the usage of ismember below, so location of variable A is not correct, On the other hand, rearrange the order o...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to manage NaN values and calculate mean under conditions
Try the following: summation = sum for each group of data (Each group has 3 data) notnandata = count the number of data which ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
trouble using datetime format in textscan
Detail explanation here: How do I use 'textscan' to correctly read a formatted date?

environ 5 ans il y a | 0

Réponse apportée
append to a table using findgroups and splitapply
Create an empty cell and empty array before the loop. Then create the table after the loop. combinefields={}; ...

environ 5 ans il y a | 0

Réponse apportée
Using the \ operator to fit a parabolic curve to a data set.
use function polyfit with n = 2 p = polyfit(x,y,n) [p,S] = polyfit(x,y,n) [p,S,mu] = polyfit(x,y,n)

environ 5 ans il y a | 1

Réponse apportée
Time and GPS data processing
You may edit the following three variables if you would like to set interval and duration. initialtime = The first reporting ti...

environ 5 ans il y a | 1

Réponse apportée
How to compute thickness of a layer in an image
You can only measure the thickness (or distance) in terms of pixel numbers according to your method. Hence you also need to kno...

environ 5 ans il y a | 0

Réponse apportée
Estimating the period and the damping of the system
This line will give an error: period=time(peaks)-time(peaks(0:size(peaks)-1)) So just try the following: period=time(peaks)-t...

environ 5 ans il y a | 0

Réponse apportée
Convert Number to Time / Duration Format of Data Column
Try the following: clear; clc; [namafile,direktori]=uigetfile({'*.txt', 'Text-files (*.txt)'},'Load Indigo Magnet'); full...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Copy data from cell 1 of file 1 and paste in n cells in file 2
I try to use readcell in my example: Since readcell will read the header as the first row, so what you want to copy becomes the...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Iteratively rename a .txt using writematrix
If you would like to write into a file with path and name as 'C:\Users\...\Matrix_MgO_Substrate.txt', you need to concatenate s...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
how to find the difference between first column and second column in a cell array
cellfun(@(x) x(:,1)-x(:,2),C,'UniformOutput',false)

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Importing csv files properly
You may use readcell and the output is a cell array. The first row shows the header and the rest of the rows contains the requr...

environ 5 ans il y a | 0

Réponse apportée
How to align headings with array elements
Use sprintf and tab, of course, need some manual adjustment. disp(sprintf('Distance\tLiters Used\tKm/L\tL/100Km')); disp(sprin...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Get horizontal (row) data from a txt file (table) with a reguler-pattern rows (series)
Use readmatrix to retrieve the data in the file as follows: B = readmatrix(full); Data1 = B(1:2:30,1); Data2 = B(1:2:30,5); ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
extracting the last three characters from cell array
Use cellfun to retrieve the last three charaters FileNameinCell=cellfun(@(x) x(end-2:end), FileName, 'UniformOutput', false) F...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Calculate normals to an irregular curve at the intersection points with a line
For function 'intersections', you can output the vector 'jout' which is the location of the intersecting points on the segments....

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Apply my calculation for all data file
Add a for loop for each file as follows: for k = 1:numel(N) baseFileName = N{k}; %for k = 1 : length(theFiles) %...

environ 5 ans il y a | 0

Réponse apportée
How to compare peaks of two sinusoidal plots
Use function islocalmax and islocalmin, but it requires lots of observation from the previous figures in order to get a correct ...

environ 5 ans il y a | 0

Réponse apportée
How do I filter time data from excel columns, where the values are numerical and the columns are character named?
Better to look at the usage of those data import function used in MATLAB. I use readcell in this case. rawdata=readcell('RES_I...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How can I extract data from the gps log?
Is it ok the result in a cell array? If yes, you may try the following: Noticed that some of your data does not have the secon...

environ 5 ans il y a | 1

Réponse apportée
List of Node pairs
Basically you just want to create the matrix, right? u=1:4; u_entend = repelem(u,1,length(u)-1); w = repmat(u',1,length(u)); ...

environ 5 ans il y a | 0

Réponse apportée
Creating a vector using conditions and a cell.
Try this: Zeros in the matrix means all conditions are not meet actid=(Ay>10) + (Ay>5 & Ay<7.5)*2 + (Ay<10 & Ay>9)*3 + (Ay<1 &...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Replace matrix entries with entries from another matrix
I do it in a cell array: clear; clc; A = [0 0 0 0 0; 0 0 0 0 0; 0 0 0 0 0]; B = [1 1 1;2 2 2;3 3 3]; combine = [A,B]; idx =...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How do I solve imnoise error when inserting variables that store the single English alphabet and its background respectively which are logical image(which are binary image)??
Newforegnd & background are BW image which is class logical and imnoise does not support. You may change it to class double or ...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Could anyone help me how to solve the issue in the code as attached
If I understand correctly, try this: A = arrayfun( @my_rand, repelem((1:3).',5), 'UniformOutput', false); B = cellfun(@(x) re...

environ 5 ans il y a | 0

Réponse apportée
Hi everyone! Please I need some help with batch importing a bunch of xml file files I have in a folder into my workspace. I tried to use xml2struct but it only gets one
Try to add the indexing for variable 'data' and each file name for i=1:length(file_list) data(i)=xml2struct(file_list{i}) ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Largest rectangle inscribed inside multiple blobs
How about separate them into 6 different images and put into the function? The images are stored in BW(:,:,1) to BW(:,:,6). A ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Matching matrices based on two columns
col=size(A,2); row=size(B,1); C = nan(row,col); [~,idx] = ismember(B,A(:,2:3),'rows'); idx2=find(idx~=0); ...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Multipying each element of a matrix with average of elements in other matrix
Try this: [Ny,Nx]=size(A); [X,Y]=meshgrid(1:Nx,1:Ny); w = (B(X)+B(Y))/2; C = A.*w

environ 5 ans il y a | 0

| A accepté

Charger plus