Answered
how to remove duplicates in correlations matrix
x=triu(x,1); Need to convert from N variables to an array to do this effectively. I'd guess that would be beneficial going ...

8 years ago | 0

| accepted

Answered
how to know the distribution of my data
Plotting the data it definitely is _not_ normal; has long RH tail and isn't symmetric. For hypothesis testing it would be bet...

8 years ago | 0

Answered
How can I extracting a signal pulse from a data
_"extract the first pulse (which is also the highest pulse)"_ Presuming you can be assured of the assumption, the first is th...

8 years ago | 1

| accepted

Answered
Hello, Please how can i plot a stem plot of lets say 300 data points?
figure hS=stem(X(:,2),Y(:,2)); % draw stem plot, save stem object handle hold on % so can add onto exi...

8 years ago | 0

Answered
Stretching a rectangle over a date axis
Ayup, "no can do" it seems...another place TMW either hasn't yet got a round tuit or didn't think it needed to add an overloaded...

8 years ago | 1

| accepted

Answered
Read text file with a header & not tab delimited
Here's where some new-fangled stuff comes into play -- the fixed-width import object. Since the portion of the file of intere...

8 years ago | 2

Answered
Repeating Matrix Element Until N Times
Just one of many possible ways... L=length(y); N=7; x=repmat(y,ceil(N/L),1); x=x(1:N);

8 years ago | 2

Answered
Delete empty cells in 3 dimensional cell array
That's a 2D cell array w/ three columns, not a 3D array. c=c(~cellfun(@isempty,c));

8 years ago | 0

Answered
How to find and store certain rows of an array
_"sadly, not exactly what I'm needing :/"_ Au contraire... :) % make up some fake data... t=repmat([190:10:230].',6,1...

8 years ago | 0

Answered
Is there any way to have labels in color for boxplots?
They're just XTickLabel values; set as desired as with any other axes. For some reason TMW hasn't made a color property for t...

8 years ago | 0

| accepted

Answered
I have a question on usage for fft to get fourier series back.
|FFT| returns the two-sided DFT so half the energy is in each of +ive and -ive frequencies. However, there is only one DC compo...

8 years ago | 0

| accepted

Answered
How to correct a problem with arguments in my fprintf
More than missing the format strings for any outputs is the unneeded for loop and bad indexing expression. fprintf('At the ...

8 years ago | 0

Answered
Loop appears to be infinite, how to assign new matrix based on seemingly simply conditionals?
_"create a new variable, 'temp_activeTime', that corresponds to all time-series in the EMG matrix that align with the time data ...

8 years ago | 0

Answered
How do i sort csv file in righ order??
A) Don't name them that way..use >> num2str([1:3].','%03d.csv') ans = 3×7 char array '001.csv' '002.c...

8 years ago | 0

Answered
Fit and Plot a Polynomial Surface
Check spelling... :) x1=[100 200 300 400]'; [x,y]=meshgrid(x,y1); You defined |x1| but used |x| as argument instead.....

8 years ago | 0

| accepted

Answered
How to plot a histogram object
bar(foo(3).BinEdges(2:end),foo(3).BinCounts) or |doc histogram| recommends |save/loadfig|

8 years ago | 1

| accepted

Answered
Why arent the labels and ticks being ran in my code?
Wrong order, call |plot| last *or* use hold on before |plot| to keep what's already been drawn. BTW, I strongly suspe...

8 years ago | 0

Answered
3D bar y axis problem
OK, try this... % first just make some similar sample data... z1=repmat([0.07 0.062 0.055 0.05].',1,3); z1=z1+rand(si...

8 years ago | 1

Answered
how to input multiple items given a prompt?
You can input whatever you wish at the prompt as long as it's a valid ML expression. >> input('?') ?[2, pi, sqrt(10)] ans...

8 years ago | 0

| accepted

Answered
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
I wish the ability to Delete or Close a Q? while someone is preparing an Answer could be disabled -- several times I have just f...

8 years ago | 5

Answered
Saving struct to an Excel file
s.rev='Rev 1'; s.ymin=1; s.pkpk=rand(3,1); s.pkpkDB=rand(3,1); >> struct2table(s,'AsArray',1) ans = 1×4 tabl...

8 years ago | 0

Answered
How to fill the remaining "N" number of rows, of an already populated vector, with zeros
Alternatively, and _perhaps_ more efficient depending upon how |GV| is generated/obtained... GV(Ntotal,1)=0; ...

8 years ago | 0

Answered
Open a text file and count the number of digits
function [num,n] = digit_counter(filename) % Returns total number and optional distribution of integers 0 thru 9 % in te...

8 years ago | 0

| accepted

Answered
find multiple maximum imaginary part
Yes, [Mcamp,m] = max(imag(camp)); returns only the index _m_ of the first element if there are multiple maxima in a col...

8 years ago | 1

| accepted

Answered
Is there a function that performs element by element multiplication between two variables and stores in one of the variable by default?
Sure, there's a function for virtually _everything_ in Matlab...all operators are are aliases for the underlying functions. ...

8 years ago | 0

Answered
Scatter use different colors for data-points
Close, but... :) (Always a "but", isn't there or wouldn't be asking a Q?) <VBG> colors = [[1 0 0] [0 1 0] [0 0 1] [1 1 0]...

8 years ago | 1

| accepted

Answered
How to Print a Numerical Vector to a List?
fmt=[' +,' repmat('%d,',1,8)]; % format w/ extra blank each line for delimiter later str=split(sprintf(fmt,vec),' '); ...

8 years ago | 0

| accepted

Answered
How to loop fopen/fread/fseek to analyze large binary files in shorter segments ?
file=('C:\Users\Admin\Documents\MATLAB\EOD examples\Examples 16ch\copy.mat'); fid=fopen(file,'r'); n_ch=16; ...

8 years ago | 1

| accepted

Answered
Importing large datasheet while ignoring randomly placed non-numeric data
dataArray=cell2mat(textscan(fileID,'','TreatAsEmpty', repmat('*',1,15),'CollectOutput',1)); Make sure my old eyes counted...

8 years ago | 0

Answered
Plotting distance of each point in a grid from a mean
M=size(Xtr,1); N=size(ttr,1); mnXtr=mean(Xtr(Xtr~=0),:); [X Y]=meshgrid(linspace(-0.5, 1.0, M),linspace(-0.5, 1..0, N...

8 years ago | 0

Load more