답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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 ...

거의 5년 전 | 0

| 수락됨

답변 있음
trouble using datetime format in textscan
Detail explanation here: How do I use 'textscan' to correctly read a formatted date?

거의 5년 전 | 0

답변 있음
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={}; ...

거의 5년 전 | 0

답변 있음
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)

거의 5년 전 | 1

답변 있음
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...

거의 5년 전 | 1

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 1

| 수락됨

답변 있음
how to find the difference between first column and second column in a cell array
cellfun(@(x) x(:,1)-x(:,2),C,'UniformOutput',false)

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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); ...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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....

거의 5년 전 | 0

| 수락됨

답변 있음
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) %...

거의 5년 전 | 0

답변 있음
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 ...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 1

답변 있음
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)); ...

거의 5년 전 | 0

답변 있음
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 &...

거의 5년 전 | 0

| 수락됨

답변 있음
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 =...

거의 5년 전 | 0

| 수락됨

답변 있음
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 ...

거의 5년 전 | 1

| 수락됨

답변 있음
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...

거의 5년 전 | 0

답변 있음
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}) ...

거의 5년 전 | 0

| 수락됨

답변 있음
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 ...

거의 5년 전 | 0

| 수락됨

답변 있음
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); ...

거의 5년 전 | 1

| 수락됨

답변 있음
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

거의 5년 전 | 0

| 수락됨

더 보기