回答済み
loop through cell arrays and perform calculations using rows from another cell array
DATA={table(rand(4,3))}; DATA(2,1)={table(rand(4,3))}; To={table(randi(5,4,1))}; To(2,1)={table(randi(5,4,1))}; % preliminarie...

5年以上 前 | 0

回答済み
How to make the average for columns in cvs folder contains (700 file) ?
Well, you've got to read the files somehow...show us what you have tried...here's the link to one way Mathworks suggests -- <im...

5年以上 前 | 0

回答済み
First number that comes after a list of numbers
>> [A;interp1([-eps(1) B],[-eps(1) B],A,'next')].' ans = 1 4 8 9 20 25 >>

5年以上 前 | 0

| 採用済み

回答済み
How to create an average of 2 lines on a single graph
OK, I see...the data are collected on a up- and down-slope symmetric ramp.. Try something like-- top=readmatrix('top_sensor_da...

5年以上 前 | 0

| 採用済み

回答済み
Histogram plot isn't shown properly.
Can't change the characteristics of the image; any linear scaling of the axis will only change the numerical values, not the sh...

5年以上 前 | 0

| 採用済み

回答済み
Averaging lots of columns at once and then combining them
"...I cannot figure out a way to take the average of each col[o]umn without manually inputing it. " Fs = 2048; ...

5年以上 前 | 0

| 採用済み

回答済み
unique command and external Excel files
Well, there is a duplicate in the 2nd column... >> d=xlsread('x.xlsx','Sheet2'); >> arrayfun(@(i)numel(unique(d(:,i)))==numel(...

5年以上 前 | 0

| 採用済み

回答済み
storing a 100x100 matrix from each iteration in a single new matrix
Two options -- either use a cell array each element of which is a 2D array or a 3D array in which each plane is one time step. ...

5年以上 前 | 0

| 採用済み

回答済み
how to average seasonly?
This one is cute... :) Unfortunately, timetable won't accept a 2D array by row so have to do things directly... t=linspace(dat...

5年以上 前 | 0

回答済み
loop for cell using variable as a the input
gtm_segmentations = [34 36]; % use double array, no point in cell array here corr_time_intervals = [20 22]; ...

5年以上 前 | 0

回答済み
How is it possible to slice up a table into smaller ones if the data contains floating point numbers?
ix=find(diff(XYZ(:,1))<0); will locate the breakpoints where the X coordinate resets. Remember diff(x) contains one less point...

5年以上 前 | 1

| 採用済み

回答済み
Plot segments of an array with NaN using a for loop
Rough outline to accomplish -- ix=find(isnan(A)); ix=ix(2:end); % find the NaN sections, ignore first for i=1:numel(ix)...

5年以上 前 | 0

| 採用済み

回答済み
Convert Text into Date Format
>> datetime('196307','InputFormat','yyyyMM') ans = datetime 01-Jul-1963 >> or >> datetime([floor(196307/100) 196307...

5年以上 前 | 1

回答済み
x-axis difference between two graphs
As suggested above, interp1 works just fine... red=readtable('red.txt');black=readtable('black.txt'); % read data plot(red.Va...

5年以上 前 | 0

回答済み
finding cells with positive values in a cell array with empty cells, cells of positive integers, and cells of nans
>> idx=cellfun(@(c)any(c>0),co_burst); >> whos idx Name Size Bytes Class Attributes idx ...

5年以上 前 | 0

| 採用済み

回答済み
Match timestamps from different data sets
See <matlab timetables> for the introduction to using timetables In particular for your particular Q? read the Topic on Resampl...

5年以上 前 | 0

回答済み
How can I read text files and compile a joint XY Position history
Well, it does seem to "just work" -- almost. jsondecode doesn't know about the 2D array bit, but it did decode the JSON info bl...

5年以上 前 | 0

| 採用済み

回答済み
While loop in if and for loop
for i = 2:N if Gyr_2(i,3) Output=RBK2(Input); elseif Gyr_2(i,1) || Gyr_2(i,2) || Ori_2(i,1) || Ori_2(i,2) Output...

5年以上 前 | 0

回答済み
How to suppress opening of command window?
Use the -batch option See <matlabwindows> for all startup options (windows, there are other links for other OS)

5年以上 前 | 0

回答済み
creating a coundown alarm everytime a function have been asked
function [] = alarm(varargin) % alarm -- display countdown left % Optional arguments % 'init' -- reset counter persisten...

5年以上 前 | 0

回答済み
How to use Xlswrite command in actxserver and how to avoid script gets hanged due to hworkbook.close command?
". I just need to avoid xlswrite in my command" Indeed. You don't want to be running dueling ActiveX processors at the same ti...

5年以上 前 | 0

| 採用済み

回答済み
Fill in missing data, unrecorded values, multiple columns
"am somewhat new to matlab and this is all I need help with..." In that case, you're doing well indeed! Congratulations!!! :)...

5年以上 前 | 0

回答済み
How to code an equation with a variable that implies to all cell and save in same size of input array (using nested for loop)
data =xlsread('***'); minOverall=min(data,[],'all'); rngOverall=range(data,'all'); data=(data-minOverall)/rngOverall; Given ...

5年以上 前 | 0

回答済み
How to return entire elements of a column of a matrix while that column includes maximum value of among all other elements of matrix
[~,ix]=max(max(A)); % return column of max of 2D array B=A(:,ix); % the resulting column Too bad there's...

5年以上 前 | 0

| 採用済み

回答済み
Change file matlab workspace name as the folder name
" 'POWER.mat' , and the folder name is 'Results2021'" Well, it depends on whether you have already created the .mat file by hav...

5年以上 前 | 1

| 採用済み

回答済み
Three variables (two independent) 3D plotting
M=1; N=2; flg=true; for B=-20:20; X=M+B;l T=[]; for L=-10:10; Y=N+X; r=B+Y+L^2; sca...

5年以上 前 | 0

| 採用済み

回答済み
How can we convert struct file to txt file?
arrayfun(@(s) writematrix([s.S s.F],[s.ID '.txt']),structWheeze)

5年以上 前 | 0

| 採用済み

回答済み
How can I link data from separate arrays?
Making harder than needs must be -- Thickness=[19.0;22.0;32.0]; Temp_data=cat(3l [0,-0.05;0.2,-0.13;0.4,0.25;0.6,0.64;0.8,0.56...

5年以上 前 | 1

| 採用済み

回答済み
How to find corresponding frequencies after viewing amplitude in descending order?
[DescendAmp,idx] = sort(peak_ft,'descend'); disp([peak_fr(idx) peak_ft])

5年以上 前 | 0

回答済み
plot discontinuous x axis
Divide the time vector by T(end) for each trace and then plot versus the normalized time [0 1] instead...

5年以上 前 | 0

さらに読み込む