回答済み
Importing data from excel, matlab is interpreting a time incorrectly
They're read correctly, that's just the internal representation of how Excel stores dates that isn't consistent with Matlab. ...

9年以上 前 | 0

回答済み
Can anyone explain this coding?
The variable _visionk_ ends up holding the average of a measure of the distance (max-min) scaled by the max of the subsections o...

9年以上 前 | 1

| 採用済み

回答済み
Merge array cells after creation to one cell
No. The cell array is required to be rectangular; the _content_ of some cell can be empty as you have, but the cell array itsel...

9年以上 前 | 0

回答済み
Error in Logical Array multiplication
It is not a Matlab bug; it is owing to the definition of matrix multiplication not making sense for logical variables; the logic...

9年以上 前 | 0

回答済み
export a variable to multiple csv files
csvwrite('file1.csv',x(:,1:2)) csvwrite('file2.csv',x(:,3:4)) File names and subscript expressions can all be variables ...

9年以上 前 | 0

| 採用済み

回答済み
How to replace all the strings of a csv file with NaN using textscan and "TreatAsEmpty" ?
OTOH, >> fid=fopen('ziad.txt'); >> fmt=repmat('%s',1,8); >> c=textscan(fid,fmt,'collectoutput',1); >> fid=fclose(f...

9年以上 前 | 0

回答済み
binning histogram and obtaining the proportions
Simplest is probably to just return the bin of the observation via |*histcounts*| or |*histc*|, whichever you're using with the ...

9年以上 前 | 0

回答済み
column operation based on frequency of element in a mtrix
>> u=unique(x(2,:))); >> [~,bin]=histc(x(2,:),u); >> [accumarray(bin.',x(1,:)).';u] ans = 3 15 2 3 ...

9年以上 前 | 0

| 採用済み

回答済み
Plotting trendlines on plot with 2 y-axes using plotyy
hAx=plotyy(.....); % plot your two axes, keeping the handles to same ... hold(hAx(2),'on') % set HOLD status fo...

9年以上 前 | 0

回答済み
Function like text() but with auto placement like legend?
No, altho I can guess the desire...would be kind of a nice touch if Matlab could/would automagically locate a desirable place to...

9年以上 前 | 1

| 採用済み

回答済み
Syntax for modifying 'LineWidth' in graph?
Not enough context to tell for certain but looks like from variable name that _ax_ is *probably* an axes handle...if so, the 'Li...

9年以上 前 | 0

回答済み
Create struct before function or in/with function?
In Matlab, you can go even further and function mytruct = myfunction(folder) cd(folder) mystruct.data = magic(5) ...

9年以上 前 | 1

回答済み
Surface plot with semilog z-axis: how to keep the same axis limit for iterative plots?
Use zlim([zMIN zMAX]) that you want before beginning the iteration. Didn't read carefully enough, sorry...you're usin...

9年以上 前 | 1

| 採用済み

回答済み
What does u and v represent in a quiver plot?
_"A quiver plot displays velocity vectors as arrows with components (u,v) at the points (x,y)."_ The (u,v) are the x- and y- ...

9年以上 前 | 0

回答済み
Find Data in Table
Using categorical for the string columns has some advantages. I fixed up your listing above to be able to read as a table via ...

9年以上 前 | 1

| 採用済み

回答済み
Is there a way for matlab to find a function in a file that doesn't match the file name?
No. Local functions (those functions in a file after the first which normally(*) is named the same as the m-file containing it)...

9年以上 前 | 1

| 採用済み

回答済み
How can I deal with the large dimension array effectively ?
Actually, |FGL1_nmvlpq(ii1,i3,i4,in,im,i1,il,ip,iq)| is _9_ -dimensional, not 8. Let's see, >> 9^30/1024/1024/1024/1024*8 ...

9年以上 前 | 2

回答済み
How to do double strings match in single statement
If you use a cell array, that'll require *cellfun* > isOK=~cellfun(@isempty,strfind(C(:,1),'Normal')) & [[C{:,2}]>=20].'; ...

9年以上 前 | 0

回答済み
How do i find all elements of value R in a matrix that are neighboring an element of value K?
One approach... [r,c]=size(A); A[false(1,c)); diff(A,[],2)== 2]; A[true(1,c)); diff(A,[],2)==-2]; A[true(r,1) ...

9年以上 前 | 0

回答済み
Finding a peak in .mat file......
See doc findpeaks % in Signal Processing Toolbox If don't have (and can't easily acquire) SP TB, post back...

9年以上 前 | 0

回答済み
How can I count the number of working days between 2 dates?
See <http://www.mathworks.com/help/finance/busdays.html <busdays>> but need Financial Toolbox

9年以上 前 | 0

| 採用済み

回答済み
Any suggestions as to vectorization of a multivariate linear regression to several "univariate" linear regressions column-by-column of the covariate matrix?
If the question is to solve the zero-intercept LSQ model of first order, then bi = sum(x.*y)/sum(x.*x) which is easily v...

9年以上 前 | 0

| 採用済み

回答済み
How can I replace NaN elements with the nearest value in the same column?
Check out <http://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint-nans <Fileexchange/4551-inpaint-nans>>

9年以上 前 | 0

回答済み
searching through RNA sequence for a string of characters
OK, while this isn't really answering the question of the thread (I did that up above), I fixed your script to operate on the fu...

9年以上 前 | 0

回答済み
how can i create a table of 4 columns from a cell array of 19 columns and name those 4 columns
ic=[ ...]; % four vector of columns wanted nam={'One', ...}; % cellstr array of names t=cell2table(C(:,ic),...

9年以上 前 | 0

| 採用済み

回答済み
searching through RNA sequence for a string of characters
Again, all the reason in the world to read the whole string at once as recommended earlier. But, the answer to the question p...

9年以上 前 | 0

回答済み
How do I read data after a specific string?
If you don't know the number of header lines or they're variable as I gather they are, two choices: # The easy route...see if...

9年以上 前 | 0

回答済み
How to find out certain number in MxN matrix?
[i,j]=find(X(2:end,:)>0.7,1); res=[min(X(2:3,j)); X(1,j)]; Do whatever you wish with the result.

9年以上 前 | 0

| 採用済み

回答済み
How do I get fprintf to print horizontally (table) using a for loop?
>> val=reshape(1:16,2,[]).'; % some data so can see order printed vis a vis in memory >> fmt=[repmat('%8.2f',1,size(val,2)...

9年以上 前 | 0

回答済み
problem calculating nucleotide percentages
[rnaFile, message] = fopen(outputFile, 'w'); While not your problem, should check for the output file opening successfully ...

9年以上 前 | 1

| 採用済み

さらに読み込む