回答済み
How to set the plot start to zero ? I have some measurements. On the x label, they start from 0 to 6, but from 1 I can see something change on
x=[0:size(Throughput,2)-1].'; % generate temporary x vector for convenience from 0 hL=plot(x,1E-6*Throughput(1:4,;).'...

5年弱 前 | 1

回答済み
Find duplicate entries and sum up their associated values then put everything back in a table
tData = readtable("Data.xlsx"); tData.Properties.VariableNames={'Name','Score'}; % set a known set of variable names tSum=r...

5年弱 前 | 1

| 採用済み

回答済み
Simple for loop on 90k records runs 51 seconds?!?
for i = 1:height(data)-1 data.duration(i) = data.time(i+1) - data.time(i); ... You've haven't preallocated and even t...

5年弱 前 | 0

| 採用済み

回答済み
Changing fit line style changes the fit line (fit line shape)
The overloaded plot functions for fit and cfit objects are replete with added functionality -- hard to wade through all the poss...

5年弱 前 | 0

回答済み
operation between timetables with different index
tTicker=readtable('SPCE.csv'); % read the data file tTicker.Yr=year(tTicker.Date;tTicker.Wk=we...

5年弱 前 | 0

| 採用済み

回答済み
Calculate average over each specific interval
2) first -- how to deal with the last posrtion of the data that shorter than 5 seconds" How do you WANT to deal with it? You ...

5年弱 前 | 1

| 採用済み

回答済み
Hello, i have a table with many rows and 3 columns. In the first column some values are NaN. How can i put NaN values in the other columns in the same rows?
Use logical indexing; no loops needed -- >> A{isnan(A.A1),:}=nan A = 3×3 table A1 A2 A3 ___ ___ __...

5年弱 前 | 2

回答済み
Matlab -dates for x axis ticks equal spacing
Answered just yesterday or the day before here -- https://www.mathworks.com/matlabcentral/answers/872423-how-to-plot-time-data-a...

5年弱 前 | 0

| 採用済み

回答済み
match the same files in a loop
f='StokesParameters_Synthetic_Star_Gain_10000000000-Real_5-Int_a=1.5_incl=90.0_pa=90.0_e=0.6_wave=900'; res=split(f,'_'); res=...

5年弱 前 | 0

回答済み
How to segregate data?
Something similar to that looks to me to be about the best can be done -- I'd probably write some helper functions similar to i...

5年弱 前 | 0

回答済み
Add headers to matrix using table
Use new string class features here -- nFiles=4; Header=["Time", "Test "+string(1:nFiles)]; returns a string array as >> Head...

5年弱 前 | 1

| 採用済み

回答済み
read mat files with specific and dynamic name format and import data
matFiles = dir('s*_results.mat'); myVars = {'results', 'prep'}; varsList=char(join(myVars)); for k = 1:length(matFiles) lo...

5年弱 前 | 0

回答済み
How to plot time data at different/random time intervals?
While not sophisticated to handle general case to isolate the day start locations, the general idea is A1time=datetime(A1time);...

5年弱 前 | 1

| 採用済み

回答済み
filling missed timestamps using prediction
tData=readtable('data.csv'); tData.Var1=datetime(tData.Var1,'InputFormat','eee MMM dd yyyy'); tData.Properties.VariableNames={...

5年弱 前 | 0

| 採用済み

回答済み
How to convert decimal into hexadecimal in "S function" Matlab ?
>> uint8(hex2dec(reshape(strrep(sprintf('%#X',2748),'X',''),2,[]).')) ans = 2×1 uint8 column vector 10 188 >>

5年弱 前 | 0

回答済み
how can i change the colors of matrix rows ?
See the Limitations and Tips section of the doc for diary Limitations Because the output of diary is plain text, the log file ...

5年弱 前 | 0

| 採用済み

回答済み
Remove timestamps (date & time) that appear on every figure by default
While not the answer to the bizarre behavior, a workaround until that can be found and resolved would be delete(findall(gcf,'ty...

5年弱 前 | 2

回答済み
How to find elements of a vector falling between minimum and maximum of an other vector without loop.
>> iswithin(b,min(a),max(a)) ans = 1×2 logical array 1 0 >> is a common-enough idiom I have a utility function for ...

5年弱 前 | 0

回答済み
Incompatible indices after trying to add multiple output rand functions.
As Image Analyst pointed out in his response earlier, FORMAT YOUR CODE PROPERLY! It is much more error-prone when things aren't...

5年弱 前 | 0

| 採用済み

回答済み
Accessing specific values in every matrix in a cell array
Unfortunately, MATLAB can't do partial array combo addressing -- best I can think of here creates the array xyz as an intermedia...

5年弱 前 | 1

回答済み
Monte Carlo simulation to find weight and statistics calculations
m=mean(Pallete(i)) %should calc mean weight of each pallete, dosent work. s=std(Pallete(i)) %should calc the standard deviation...

5年弱 前 | 0

| 採用済み

回答済み
RMSE of 1 row of a matrix?
Guessing without a clear definition of what things are and what, exactly it is that is wanted... RMSE=norm(F(1,1:sensor)- F_the...

5年弱 前 | 0

回答済み
Legend in bar plot
A somewhat different approach to Walter's to generate the three needed bar handles -- use a 'stacked' plot with the elements on ...

5年弱 前 | 1

| 採用済み

回答済み
extracting numbers after the particular string from cell array
Oh. I see I didn't look far enough down the file -- the header stuff ends at record 170; the other data starts at record 171. t...

5年弱 前 | 1

| 採用済み

回答済み
Error csvread() numeric field -> *i
In the far distant past I railed at TMW for not adding the complex variable into the various input routines -- for a scientific ...

5年弱 前 | 0

回答済み
Can you use a wildcard to start a filename?
Sure, wildcards work well for the purpose with dir()... rootDir='C:\Users\janec\Desktop\Hampshire P3_VisOdd\Hampshire P3_VisOdd...

5年弱 前 | 0

| 採用済み

回答済み
I need to measure the delay between each peak of two signals.
Well, I couldn't help myself... :) comes from some machinations/experimentation with findpeaks after first just plotting and ...

5年弱 前 | 1

回答済み
xlim function error. i have seen on video, the codes were working but with me it is not working
You're trying to set axis limits on a numeric axes with datetime values -- no can do... dates=datetime(2025,8,17)+calmonths(2:1...

5年弱 前 | 0

| 採用済み

回答済み
How to filter out the table rows not matching the defined criteria?
tYourTable=tYourTable(contains(tYourTable.frame_id,"map")&contains(tYourTable.child_frame_id,"drone_base"),:);

5年弱 前 | 0

回答済み
Why can't I display a line on a plot (can only have points marker)
x1 = [159:163]; y1 = 77; plt1 = plot(x1,y1,'-r','LineWidth',3,'Marker','.','MarkerEdgeColor','r'); When you plot() a vector o...

5年弱 前 | 0

| 採用済み

さらに読み込む