Respondida
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...

más de 9 años hace | 0

| aceptada

Respondida
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>>

más de 9 años hace | 0

Respondida
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...

más de 9 años hace | 0

Respondida
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),...

más de 9 años hace | 0

| aceptada

Respondida
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...

más de 9 años hace | 0

Respondida
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...

más de 9 años hace | 0

Respondida
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.

más de 9 años hace | 0

| aceptada

Respondida
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)...

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

Respondida
How can I plot specific columns of my csv file
data=csvread('1333_mag.csv',1,0); % read the csv file, skip header row plot(data(:,1),data(:,2) % plot 2nd col...

más de 9 años hace | 2

| aceptada

Respondida
Plot using cell array text
No, pretty straightforward with categorical arrays... [~,txt]=xlsread('places.xls'); cats={'Place 1';'Place 2';'Place 3'...

más de 9 años hace | 0

| aceptada

Respondida
Extracting specified data from Excel
OK, not a bad effort for first time... :) _IF_ the data are as the sample spreadsheet shows such that the uninteresting value...

más de 9 años hace | 0

Respondida
Date/time matrix for every hour.
Without |*datetime*| class, use |*datenum*|...same idea, just a little more work >> first = datenum(2006, 12, 1); >> last ...

más de 9 años hace | 0

| aceptada

Respondida
Program not running correctly. Trying to write program to determine number of days in month.
... switch (month) case {1,3,5,7,8,10,12} days = 31; case {4,6,9,11} days =30; case 2 ...

más de 9 años hace | 0

| aceptada

Respondida
Can I control the column order of workspace variables saved to .mat format?
Undocumented behavior. Can't rely on anything about the internal order; all SAVE says is that can LOAD the file back and have w...

más de 9 años hace | 0

| aceptada

Respondida
Why is empty string test failing?
>> p=cd p = C:\ML_R2014b\work >> whos p Name Size Bytes Class Attributes p 1x17 ...

más de 9 años hace | 0

| aceptada

Respondida
Multiple linear regression explanation
There is only a single regressor and a response variable so despite the comment in the code, this is _NOT_ multiple regression (...

más de 9 años hace | 0

| aceptada

Respondida
Convolution built-in function
What John and Stephen said. What you appear to want (and wanted originally) is just synthetic=conv(RC,amp); which would...

más de 9 años hace | 3

| aceptada

Respondida
overlapped bar charts up and down
See if one of the following is what you're looking for... subplot(3,1,1),bar(data) subplot(3,1,2),bar(data.') subplot...

más de 9 años hace | 3

Respondida
Saving a matrix that have been created in a function in order to use it later.
You don't have to try to do that; use the functional form for the constraints for |*fmincon*| to call whenever it needs to evalu...

más de 9 años hace | 0

Respondida
Excel Date Conversion into MATLAB
Are the Excel data stored as dates or as strings? If they're date types they'll be read by |*xlsread*| as Excel serial numbers....

más de 9 años hace | 0

Respondida
How to write a single element into an excel sheet
doc xlswrite Pretty-much, trivially... xlswrite('yourfile,xls',x,sheet,'B2') where |sheet| is either a numeric number...

más de 9 años hace | 1

| aceptada

Respondida
Extracting data from excel
With "pure" Matlab-supplied functions, no. You would have to do it indirectly, reading the header row then finding the desired ...

más de 9 años hace | 1

Respondida
error in matrix multiplication.
While I don't see it at first blush in the code, one (or both) of the two variables must be integer class-- >> i1=eye(3); ...

más de 9 años hace | 0

| aceptada

Respondida
How to find the average in a row?
What's wrong with mn=mean(tempv); % ???

más de 9 años hace | 0

| aceptada

Respondida
Attempting to Plot atand function and nothing appears in plot, any suggestions?
>> whos w Name Size Bytes Class Attributes w 1x51 408 double >...

más de 9 años hace | 0

| aceptada

Respondida
How do i renaming files based on their folder names?
... for F=1:length(subdinfo) % no need for temporary variable here [~,n,e]=fileparts(subdinfo...

más de 9 años hace | 0

Respondida
Two functions on Same Graph - Vector Error
Several issues, the firstest is that you need the element-wise multiplication operator for P2, not matrix multiplication. These...

más de 9 años hace | 0

Respondida
How to make the space between Columns the same when using X Tick even that the value between columns are increased in unorganized way
Two basic choices...illustrate below... >> hAx(1)=subplot(3,1,1); % make three to compare >> plot(x,y) ...

más de 9 años hace | 0

| aceptada

Respondida
Speed of matrix storage
I can't reproduce the result... metch.m tic,B=[A A;A A];t1=toc; tic,B=A*[1 0; 0 0] + A*[0 1; 0 0] + A*[0 0; 1 0] + A...

más de 9 años hace | 0

Cargar más