Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
How to plot error bars for multiple data points at a single time point
Plot versus ordinal value and then use xticklabels to label the times... hB=bar(EXP.Blood_15); hold on hEr=errorbar(1:numel(E...

5 years ago | 0

Answered
sort the in plot
Many possible ways... Sort a, keep index for b --- [a,ix]=sort(a); % sort a, keep order index, replace a with sort...

5 years ago | 0

| accepted

Answered
how to generate random point that have fix distance between each point
I see two possible simple alternatives-- Just use rejection technique to remove those within the prescribed distance metric(*),...

5 years ago | 0

Answered
Does anyone Know how can i share an app with a user that dont have MATLAB
Use the MATLAB Compiler TB https://www.mathworks.com/products/compiler.html Works quite nicely...have built a couple relatively...

5 years ago | 0

| accepted

Answered
How to run find function faster?
Generally one doesn't need find explicitly at all; just use the logical addressing vector returned by the logical test. Alterna...

5 years ago | 1

| accepted

Answered
Problem with my project
This seems to be a FEX submission -- Convert a doc or docx file to pdf file. You must specify the full path for both files. ...

5 years ago | 0

Answered
Error when trying to plot with a datetime array
tDaily=readtable('Daily__Jun-20-2021_12_32_15PM.csv','NumHeaderLines',1); tDaily.ID=categorical(tDaily.ID); tDaily.Date=dateti...

5 years ago | 0

| accepted

Answered
How to decrease frequency resolution by keeping RMS same in MATLAB
Frequency resolution is solely dependent upon the sample rate and number of FFT points used -- you since the number of points is...

5 years ago | 0

| accepted

Answered
Find all but one in an array of chars
In future, attach the data itself (as .mat file or just sample text) not images. Nobody can do anything with images except look...

5 years ago | 1

| accepted

Answered
How to create matrices with a fix number of constant?
nR=3; % number rows A=repmat([q d n p],nR,1); % create A of nRx4 M=randi(20,size(A)); % generat...

5 years ago | 0

| accepted

Answered
Difference between FFT(FFT(X)) ,FFT2(X) and FFT(X,[ ],2)
As the doc for fft2 shows fft2(X) == fft(fft(X).') or the 2D FFT is computed sequentially by 1D and then transposing and 1D th...

5 years ago | 0

| accepted

Answered
How to find particular number in the data vector?
You've answered the question (sorta') with your tag referencing find -- but...(there's almost always a "but", isn't there!!?? )...

5 years ago | 0

Answered
Creating new variable with maximum value from within a timetable and it's not giving the correct associated date time.
The retime method over a time period returns the maximum over the period; it doesn't keep track of the particular record in the...

5 years ago | 0

Answered
Splitapply: Returning multiple output values
This is harder because corrcoef returns a square maxtrix, not just the 2-sample coefficient, p-values. Easiest is to write a he...

5 years ago | 0

| accepted

Answered
Including interpolation row by row in a matrix using a for loop
What error? Looks like should be ok but didn't have data to try and didn't make up any...but should be able to use the vectoriz...

5 years ago | 0

| accepted

Answered
Labeling 3 different points on plot
text(1:3,rand(1,3)*10,{'A','B','C'}) xlim([0 5]),ylim([0 10]) produced All you need do is define what x,y pairs and label ...

5 years ago | 0

Answered
Accessing contents inside Nested cell
nMax=cellfun(@numel,edges) array=cell2mat(cellfun(@(c)cat(2,c,zeros(1,nMax-numel(c))),edges.','UniformOutput',false)); Will a...

5 years ago | 0

Answered
For loop to replace n/a with NaN in a table
This is a case readtable needs some help -- use an import options object... opt=detectImportOptions('Cape_Breton_Highlands_NP_W...

5 years ago | 0

| accepted

Answered
How to prevent matlab from exponential form in displaying arrays
With the common disp() or echo of a variable to the command window, no--a MATLAB array is an entity. You can output in whatever...

5 years ago | 0

| accepted

Answered
Error using readtable: Must be a scalar logical value
"file names are Master w EQ 00 deg.txt, Master w EQ 05 deg.txt, etc up to Master w EQ 90 deg.txt." d=dir('Master*deg.txt'); fo...

5 years ago | 0

| accepted

Answered
Need to calculate the mean without considering the 0 counts. In [1 2 3 4 0 6 7], mean should be (1+2+3+4+6+7)/6 and then output place the mean of six number at place of 0.
>> v=[1 2 3 4 0 6 7]; >> v(v==0)=mean(v(v~=0)) v = 1.0000 2.0000 3.0000 4.0000 3.8333 6.0000 7.0000 >>...

5 years ago | 0

Answered
Normality test of the Matlab function 'randn'
I always use the Wilks-Shapiro test(*) and have little experience with Lillifors test, but some trials with various N have convi...

5 years ago | 0

Answered
How to extract rows from a table using a loop to search for specific column values, and create a new table with extracted rows
Would be much easier if attached a subset of the input file or a .mat file containing the table...we have to make up stuff to tr...

5 years ago | 0

| accepted

Answered
How to quickly save a matrix by adding rows?
Yes. Preallocate the array and index into it...without context it's conjecture what you have/are doing, but the general idea is...

5 years ago | 0

| accepted

Load more