Answered
@ Symbol in function handles as an input variable to another function
The issue is given by the requirements of the function integral -- the help file for it reads in part-- >> help integral inte...

13 dagar ago | 0

Answered
Finding one value in matrix from covariance matrix
There is no solution to the given problem data set -- by definition cov(A) contains the column variances along the diagonal. Yo...

14 dagar ago | 0

Answered
Retrieving data from Excel in multiple sub folders with different names
There's a lot of structure in those directory names -- you have two choices in how to access them and write the code to do so in...

14 dagar ago | 0

Answered
Plotting bar graphs with different colors
I've railed over bar interface for 20+ years -- this is harder than it should be even though there is an example in the doc, it'...

15 dagar ago | 0

| accepted

Answered
Find value between the overall maximum and its following minimum
Couple ways... First, [mx,imx]=max(X); % return global max, location imn=find(diff(X(imx:end))>=0,1)+...

16 dagar ago | 0

| accepted

Answered
How to split an array of tot seconds in windows of 60 sec haveing also windows without values?
Use discretize. In paricular, look at the third input form where the bins, and input arrays are durations (iow, convert your ti...

16 dagar ago | 0

Answered
Subtracting in a structure
Pass(NumPass).SortedTotalPlayers = diff[0 Pass(NumPass).SortedTotalPlayers];

16 dagar ago | 0

Answered
How do I remove all the rows with NaN-value of a specific column?
X(isnan(X(:,1)),:)=[]; % solution a -- remove those rows w/ NaN in column 1 X=X(~isnan(X(:,1)),:); % solution...

16 dagar ago | 1

| accepted

Answered
signal amplitude using FFT - conflicting results and misunderstandings
The latter accounts that the FFT and PSD are two-sided (hence the "2" in the variable P2 for the PSD). The total energy is thus...

16 dagar ago | 0

| accepted

Answered
Problem with specifying separate colours for each of my SCATTER points.
Read the documentation :) c — Marker color [0 0 1] (default) | RGB triplet | three-column matrix of RGB triplets | vector | 'r...

16 dagar ago | 0

| accepted

Answered
Plot of 2 matrix of same dimensions
Description example plot(X,Y) creates a 2-D line plot of the data in Y versus the corresponding values in X. If X and Y are b...

17 dagar ago | 0

| accepted

Answered
Invalid syntax for calling function 'cond' on the path
>> which -all cond C:\ML_R2020b\toolbox\matlab\matfun\cond.m >> cond is a builtin MATLAB function (the condition number) unl...

18 dagar ago | 0

| accepted

Answered
Add a new column to CSV file with equations
[tTable array2table(cumsum(tTable{:,{'A','B'}}),'VariableNames',{'cumA','cumB'})]; where tTable is your table variable. One ca...

19 dagar ago | 0

| accepted

Answered
How to find a corresponds value?
Use the optional second return value of max [mx,imx]=max(t.Power); rmx=t.Radiation(imx); NB: the use of the table, t variable...

19 dagar ago | 0

Answered
How can I replace multiple indices of a matrix with specific values?
Build the indices vectors somehow -- you have to know where you want the values to in some manner, whether that is through some ...

19 dagar ago | 0

Answered
How to plot variables from a table?
>> load Xsensor_ID002_SN01_XT001_XSN.mat >> data.time=duration(strrep(data.time,'"',''),'InputFormat','hh:mm:ss.SSS'); >> data...

20 dagar ago | 0

| accepted

Answered
Finding strings in an excel cell and deleting the entire row
<Answers/347460-how-do-i-delete-an-entire-row-from-excel-from-matlab?> Hint for future -- check out the "SEE ALSO" links Answer...

22 dagar ago | 0

Answered
Set XTick of yyaxis to have integer ticks only
yyaxis right plot(rand(1,20)*4, rand(1,20), '*') yyaxis left plot(rand(1,20)*6, rand(1,20), '*') hAx=gca; ...

22 dagar ago | 0

Answered
Plotting Excel Sheet of 0s and 1s inkjet printer visualization
How about I=readmatrix('yourfile.xlsx'); imagesc(~I) colormap(gray) If you don't want an image, then try [r,c]=ind2sub(size...

22 dagar ago | 0

Answered
Find max values within a defined range for each column and rows of a matrix
Turn into a timetable and use retime

22 dagar ago | 0

| accepted

Answered
How to recover unsaved matlab script if Matlab shutdown automatically?
See previous Answer https://www.mathworks.com/matlabcentral/answers/103130-does-the-matlab-editor-debugger-automatically-save-op...

24 dagar ago | 0

| accepted

Answered
Change the distance between boxplots
boxplot doesn't support variably-spaced box locations. use 'LabelOrientation','Horizontal' to maintain normal tick label orient...

24 dagar ago | 0

| accepted

Answered
change in xlrange of xlsread while sing loop
That's the hard way to go at it...just read the spreadsheet into a table and operate over the regions of interest -- simple exam...

24 dagar ago | 0

Answered
Textscan import string data from .txt file
Read the file as is and then clean it up instead... d=readcell('202103.txt','Delimiter',newline); % read a cellst...

24 dagar ago | 0

| accepted

Answered
Matlab - problem with snr function
The two inputs have to have the same orientation as well as same length. You've created a row vector above for the noise while ...

25 dagar ago | 0

| accepted

Answered
How to preserve nanosecond precision in datetime calculations (for large numbers)
>> t='1294871257.002060945'; % treat long value as string >> dsec=seconds(str2double(ext...

26 dagar ago | 0

Answered
Is it possible to declare a char variable as global?
Seems to work just fine here -- although globals are fraught with danger, if you're cautious the above usage doesn't seem too eg...

26 dagar ago | 0

| accepted

Answered
Loop through folders to pick data file
You shouldn't be putting your data files under the MATLABROOT tree....that's fraught with difficulties when upgrade. MATLAB cre...

27 dagar ago | 0

Answered
I need to change n elements in an array chosen randomly
Not totally clear yet just what are valid locations to be changed -- the above code sets the diagonal elements to one anyways; i...

27 dagar ago | 0

Answered
How can I perform a set of calculations on multiple matrices located in a csv. file?
Those files have structure to deal with -- generically, one could read the header info and parse it to find out the content -- b...

27 dagar ago | 0

Load more