Respondida
How to seperate similar data stacked up in one coulmn into multiple columns
This is going to be somewhat of a pain in the proverbial appendage...it's not even clear what constitutes an iteration for certa...

casi 8 años hace | 0

| aceptada

Respondida
Find average for each year
That should work fine excepting you didn't allocate for the different means by year and overwrote the variable meanT on each ite...

casi 8 años hace | 0

| aceptada

Respondida
How to calculate the mean for the number of occurances
u=unique([C{:}]); n=cell2mat(cellfun(@(x) histc(x,u),C,'uni',0)); n(n==0)=nan; x=cell2mat(arrayfun(@(x,n) repmat(x,1,n),u,rou...

casi 8 años hace | 0

| aceptada

Respondida
How can I set the FormatSpec to read this numerical value?
ML doesn't have the facility built into any of the text conversion routines to handle the omitted exponent indicator; some Fortr...

casi 8 años hace | 0

| aceptada

Respondida
Converting C++ to Matlab code!
disp("\nReading values from 'xxxx3padata.txt' file.....") val=importdata('xxxx3padata.txt'); Rmn=mean(abs(val)); Rms=rms(va...

casi 8 años hace | 0

| aceptada

Respondida
I am unable to understand what happening in this code of Variance of 3*3 neighborhood
Just the point(s) r away from each point in the input image array in each plane. If the image were 256x256, and r were 5, say, ...

casi 8 años hace | 0

Respondida
Hi All, I have several days worth of time stamped data. Unfortunatly the date has not been provided. How can I convert the time to datetime and increase the date by one day when the time passes 00:00:00? Thankyou
tsd=readtable('tsd.txt'); tsd.Var1=datetime(tsd.Var1); du=[duration(0,0,0);diff(tsd.Var1)]; ix=find(du<0); tsd.Var1(ix:end)=...

casi 8 años hace | 0

| aceptada

Respondida
Printing just one column in text file in scientific notation
>> ab=[110.51 1.2222e-13 111.50 1.3897e-13 112.49 1.2342e-14 113.48 8.8123e-15]; >> fmt=['%8.2f %12.5e \n']; >> fprintf(fmt...

casi 8 años hace | 1

| aceptada

Respondida
Discard unwanted information from string array
Alternatively, there's the new(ish) extractAfter function that was introduced with the new strings class... >> extractAfter(s,"...

casi 8 años hace | 2

Respondida
How to find the index of a specific column in a matrix?
>> [~,ib]=ismember(x.',F.','rows') ib = 4 2 1 3 >>

casi 8 años hace | 1

| aceptada

Respondida
How to sum 2 .mat file (Complex int)
The assignment of LOAD to a LHS variable creates a struct of the variable name provided with the fields the variable names in th...

casi 8 años hace | 0

Respondida
Line Breaking of char-array
>> fmt=['%04d' repmat('%6.2f',1,size(results,2)) '\n']; >> fprintf(fmt,[[1:size(results,1)].' results].') 0001 0.00 0.00 0....

alrededor de 8 años hace | 1

| aceptada

Respondida
Date and time formate translation
dt=datetime('25-Mar-2014 13:00:00'); fmt= 'uuuu-MMM-dd''T''HH:mm:ss.SSS''Z'; dt.Format=fmt; >> dt = datetime 2014-Mar...

alrededor de 8 años hace | 2

| aceptada

Respondida
Average and plot variable from multiple .mat files
The first loop over k below is superfluous...it just loads each file into the same array but does nothing with it; then you star...

alrededor de 8 años hace | 0

Respondida
Add a number(specific column) to vector without deleteing it.
One of many possible ways... insertat=2; val=2.5; a=[a(1:insertat-1) val a(insertat:end)]; The key is to not store into the ...

alrededor de 8 años hace | 1

Respondida
Extract data from polar plot [example.fig]
Well, a variant of that works ok here with the example polar plot in the documentation. >> hF=openfig('polar.fig'); >> hAx=gca...

alrededor de 8 años hace | 0

Respondida
How to load a specific channel from EEG into MATLAB
Often unless data files are simply humongous, it's just simpler to read it all in and then selectively keep what you're interest...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to get data based on first and second column
mxx=max(A(:,1)); % max X coordinate in array ix=ismember(A(:,1),[92:0.025:mxx]); % locations in A of desir...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to bundle dates of several years?
Use findgroups and splitapply-- g=findgroups(AllWindDataSan01to14,month(AllWindDataSan01to14.DATE),day(AllWindDataSan01to14.DAT...

alrededor de 8 años hace | 0

Respondida
Plot 2 signals with different time axis in the same graph
plot(t1,y1) % first plot hold on % add more plot(t2,y2) % second line on top... or, y...

alrededor de 8 años hace | 0

| aceptada

Respondida
How can I join two vectors (integer and decimal)?
C=A+B./10.^fix(log10(B)+1);

alrededor de 8 años hace | 2

Respondida
Convert spreadsheet that contains variable names and numbers into simple variables
OK, given the example data from the original question in an .xls file -- to build a struct with those variables as fields with t...

alrededor de 8 años hace | 2

| aceptada

Respondida
How do I import a file containing both numbers and strings
If you're going to read in text in random locations, unless you can determine or require the user to tell you where those locati...

alrededor de 8 años hace | 0

Respondida
How to split huge .csv files to multiple .csv files based on size?
fidR=fopen('originalfile.csv','r'); % open the big file to read NFiles=20; ...

alrededor de 8 años hace | 0

| aceptada

Respondida
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Can we remove/kill that annoying popup about the new RTE that comes up every time try to edit a response to make a correction or...

alrededor de 8 años hace | 0

Respondida
the error " Assignment has more non-singleton rhs dimensions than non-singleton subscripts" when happen?
Index(1,:)=randi(1,K,length(QPSK_Set))=1; appears a typo; above wouldn't run. But, the error as given is because the size of s...

alrededor de 8 años hace | 0

Respondida
Scale one scattered dataset to fit another scattered dataset
Sure, your "equation" to minimize in least-squares sense is D1(x,y)-k*D2(t,z) function sse=sseval(k,D1,D2) sse=sum((D1-k*D1)...

alrededor de 8 años hace | 0

| aceptada

Respondida
Is there a matlab function similar to base R "row" or "col"? It returns a matrix of integers indicating their row number in a matrix-like object.
For the specific case, not knowing the general definition, row=@(x) kron(diag(x),ones(1,size(x,1))); col=@(x) row(x).'; Apply...

alrededor de 8 años hace | 1

Respondida
Help with menu command
Don't use fixed list, use an array of possible choices and keep a corollary variable of those already taken so those aren't ever...

alrededor de 8 años hace | 0

| aceptada

Respondida
how can an function containing structure data can be used in main code while main code also containing same/different structure.
Variables in a function are in their own scope internal to the function, only what is returned tot the caller is available to th...

alrededor de 8 años hace | 0

Cargar más