回答済み
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....

7年以上 前 | 1

| 採用済み

回答済み
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...

7年以上 前 | 2

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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 ...

7年以上 前 | 1

回答済み
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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

| 採用済み

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

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

| 採用済み

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

7年以上 前 | 2

回答済み
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...

7年以上 前 | 2

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
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; ...

7年以上 前 | 0

| 採用済み

回答済み
[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...

7年以上 前 | 0

回答済み
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...

7年以上 前 | 0

回答済み
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)...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 1

回答済み
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...

7年以上 前 | 0

| 採用済み

回答済み
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...

7年以上 前 | 0

回答済み
Finding peak width at threshold
OK, finally(! :) ) had time to sit down for a few minutes...it's more convoluted than if had just started from scratch, but I t...

7年以上 前 | 0

回答済み
use of function in if statement
First and foremost, to place a function in a script or other function as local, it must be outside a logic construct...you then ...

7年以上 前 | 0

回答済み
Fron Python to Matlab
See doc randn When looking for something you don't know function name but have a clue about what is, lookfor keyword is u...

7年以上 前 | 0

回答済み
How to plot the same variable from multiple excel files?
A. If you don't have to actually calculate across the various datasets, just process them sequentially -- a loop counter could ...

7年以上 前 | 0

回答済み
calculation of a mean
26668626 isn't evenly divisible by 10; what do you want to do with the leftover 6 elements? You also can't add a column of 1/10...

7年以上 前 | 1

回答済み
why "M(i,j) = 'NN' is illegal? and how to correct it?
'MM' is a 2-element character array that you're trying to store into one array element--"you can't do that!" :) To store a char...

7年以上 前 | 0

回答済み
Changing elements of column and row in a matrix
One way... >> flipud(A(:,2:3).') ans = 6 5 90 91 >> Given the Comment below of arbitrary arrangement being arb...

7年以上 前 | 0

回答済み
How to overlap a least-squares line and its scatter plot in a LOG scale ?
OK, while it would be more fun with real data and to see what, specifically, you had done to correct where there was the misconc...

7年以上 前 | 1

| 採用済み

回答済み
textscan gives me wrong number of lines
In covTable = textscan(fid,['%s',repmat('%.8n',[1,20])],'HeaderLines',1); you set the _'HeaderLines'_ option to True (1)...

7年以上 前 | 0

回答済み
How to calculate PSD estimate of EMG data in 1Hz frequency bins for 100ms time windows.?
For those sampling parameters, one has that Fs = 256; % sampling frequency, samples/sec T = 1; % sample...

7年以上 前 | 0

| 採用済み

回答済み
Overdetermined system of equations - 8 degree polynomial
_" is this an inherent problem of matlab?!"_ Yes, but it's not really Matlab, per se, but computational numerics with FP arit...

7年以上 前 | 2

さらに読み込む