Answered
how to save past outputs of a function
Use the output function option to write the function to return the values. There's an example in the documentation that creates...

11 years ago | 0

| accepted

Answered
how to declare all the rows and all column in matlab in a matrix or array??
The commented-out line deleting the row will, as James noted, break as the array will then have a size(C1,2) one less than the o...

11 years ago | 0

Answered
Home use option - size limitation?
<http://www.mathworks.com/products/matlab-home/?s_tid=tb_home> You can walk thru the process and select customization options...

11 years ago | 0

Answered
how to declare all the rows and all column in matlab in a matrix or array??
_"if [...] rows found zeros with all its column then the entire row will be deleted"_ If the array is _x_, then idx=~any...

11 years ago | 0

| accepted

Answered
Square Wave Generation becomes inaccurate !
The best *square* can do is to have the requested duty cycle that most nearly approximates that requested over the length of the...

11 years ago | 0

| accepted

Answered
How to graph an equation with one independent variable?
First rewrite the equation to be able to use vector inputs using the "dot operatiors" c=(M/(pi*4*D*t))*exp((-r.^2)/(4*D*t))...

11 years ago | 0

Answered
Importing text files like above
data=char(textread('kin.txt','%s','delimiter','\n','whitespace','','headerlines',1)); data=table(data(:,1:7), data(:,9:end)...

11 years ago | 0

| accepted

Answered
Are the if statement conditions I have implemented identifying the correct data?
Having done it via a loop it works but you should-- * vectorize, and * not use short-circuit operator Here's where a litt...

11 years ago | 0

Answered
Importing multiple text files
See the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F> Note reading the filenames from an...

11 years ago | 1

| accepted

Answered
Recognizing and removing unwanted lines from data file
for j=1:length(files) fid = fopen([datdir files(j).name],'rt'); d=[d;cell2mat(textscan(fid,'%f %f','headerlines', 2,...

11 years ago | 0

| accepted

Answered
MATLAB outputting information I'm not asking for, even after semicolon
_f=zeros(2, 1, Num_members)_ No semicolon there, so since _Num_members_ is 5 it's precisely what you should expect. f=ze...

11 years ago | 0

Answered
Error: Cell contents reference from a non cell array object.
... fname=fetch(fname,10); ... OK, from the database documentation for *fetch* one finds... _When fetch returns a curs...

11 years ago | 0

Answered
sampling pairs of elements
Select the sample from the indices 1:length(vector) and the use that to select the elements.

11 years ago | 0

Answered
Trouble with if statement
The error is correct; if you take the *else* branch then nothing is assigned to _rep_ and you didn't use *varargout* so it expec...

11 years ago | 0

| accepted

Answered
Problems with a plot
Just answered very similar question at <http://www.mathworks.com/matlabcentral/answers/180035-time-series-resample-axes-datet...

11 years ago | 0

Answered
Looping outputs URGENT please help
... [B,SE,PVAL,INMODEL,STATS,NEXTSTEP,HISTORY]= ... stepwisefit(xx,yy,'penter',.05)...

11 years ago | 0

| accepted

Answered
Fast Look-up table
[~,idx]=min(pdist2(pvalues,abs(signal),'euclidean'));

11 years ago | 0

Answered
Dlmwrite function problem to be fixed
doc colon dlmwrite('newfile',[C(:,1) C(:,5)]);

11 years ago | 0

| accepted

Answered
i have .xl sheet and i want to convert it to .mat file to give as input vector for trainning in neural networks. how we can do this task and where i need to do this task
data=xlsread('ExcelFile'); % load an Excel file save('NewFile','data') % save a .mat file Pass the array _data_ to...

11 years ago | 0

Answered
Plotting using multiple x-axes and y-axes.
... ax1_pos=set(ax1,'Position'); ax2 = axes('Position',ax1_pos,... _ax1_pos_ will be empty after the above; you (prob...

11 years ago | 0

| accepted

Answered
How to edit second y axis (when using plotyy function)?
Seems to work if select on the LH or RH axis after switching focus to the figure and then double-click on the axes of choice. I...

11 years ago | 0

Answered
how to minimizing the error and find the constants by fitting the data
Presuming have the Stat Toolbox, *ninfit* makes it pretty simple directly... If you write function dhat=model(coef,x) ...

11 years ago | 0

| accepted

Answered
how can i read 20 files form excel for matlab together
<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

11 years ago | 0

Answered
While Loop column vector of strings
If these are formatted phone numbers, they're text, too... fh = fopen('phoneList1.txt'); c=textscan(fh,'%s %s','delimite...

11 years ago | 0

Answered
Use a function that returns multiple values as input argument to another function
As a reference, Matlab functions can only return a single output variable; the alternate return syntax is simply not supported. ...

11 years ago | 1

| accepted

Answered
How can I put the epsilon letter (like the symbol "3" but in the other direction) in xlabel of plot of MatLab R2014b? I try to put '\epsilon' and 'varepsilon' but it doesn't work. Thanks in advance!
What interpereter is set? The following works fine here... >> hXL=xlabel('\bf\epsilon','fontsize',14); >> get(hXL,'interp...

11 years ago | 0

| accepted

Answered
How to merge two different size matrix logically?
C=[A zeros(size(A)]; % allocate C(ismember(A,B),2)=B; % merge by position

11 years ago | 0

Answered
How to make datatype in 2 matrices equal
Classic case of floating point rounding...see <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_e...

11 years ago | 1

| accepted

Answered
Error using quad "Error using quad (line 75) The integrand function must return an output vector of the same length as the input vector."
_"I am using .^ but..." But you aren't, everywhere. The line given by the error message is-- hq = @(q,n0) ((eq(q))^2+2*...

11 years ago | 1

Answered
Can someone explain how to plot y[n]
It's not defined unless you define it and again, Matlab arrays are 1-based (and, unfortunately, inflexible in that). To handl...

11 years ago | 0

Load more