Answered
files with specific extension
use the dir command to find all files in a directory with the .m extensison us dir('*.m') for jpg dir('*.jpg') ...

ungefär 12 år ago | 0

| accepted

Answered
Finding the first and last element of a matrix
Suppose you have a matrix of 5 columns by 50 rows val=rand(50,5); % generate the data min_val=min(val) ...

ungefär 12 år ago | 2

Answered
syntax to store char in mat file
var_name='c' % saves the char 'c' in var_name save('new.mat','var_name') % saves the variable 'var_name' in new.mat ...

ungefär 12 år ago | 0

| accepted

Answered
Removing multiple NaN's from an array
Use isnan doc isnan in your case ar(isnan(ar))=[]

ungefär 12 år ago | 1

| accepted

Answered
mat-file
You do not save a function in *.mat file. you save a function in an *.m file mat files are used to store the variable data....

ungefär 12 år ago | 0

Answered
Anyone using MATLAB on a LINUX OS??
Have tested on Ubuntu 10.04, 11.10, and Redhat 6. Work pretty well..

ungefär 12 år ago | 3

Answered
Transfer a matrix in a quick way
You can use reshape doc reshape Eg. a={'a' 'a' 'a' 'b' 'b' 'b' 'c' 'c' 'c';'a' 'a' 'a' 'b' 'b' 'b' 'c' 'c' 'c'; '...

ungefär 12 år ago | 0

Answered
image write
If you want to save your plots you could use the print command doc print Eg. h=figure plot(1:4) print(h,'-dbmp...

ungefär 12 år ago | 0

Answered
polynomial equation
You might want to look at the symbolic math toolbox.. <http://www.mathworks.com/help/toolbox/symbolic/solve.html>

ungefär 12 år ago | 0

Answered
Find elements in one array not in another
try setdiff doc setdiff % in above case first_Set=setdiff(a,b) second_set=setdiff(b,a)

ungefär 12 år ago | 10

| accepted

Answered
How to randomly select data out of a dataset?
I dont know if this will help.. Suppose your data is in a a=rand(10,1); % generate random data [trainingset]=...

ungefär 12 år ago | 1

Answered
stuck on a simple cumsum prob
x = cumsum(randn(1000,1)); %y = (x(2:end) - x(1:end-1)); y=[x(1); (x(2:end) - x(1:end-1))]; xNew = cumsum...

ungefär 12 år ago | 0

Answered
Relational Operators Issue - 1 is not equal to 1.000
This wiki might help <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

ungefär 12 år ago | 1

| accepted

Answered
a(a==NaN) does not find NaN's in matrix. What to do?
Sharon, you are unable to replace the NaN because NaN ~= NaN (in matlab NaN's are unequal) you can check this by isequ...

ungefär 12 år ago | 2

Answered
Read multiple files
This should help <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F>

ungefär 12 år ago | 3

| accepted

Answered
grouping observations according to strng dates with no empties
d=datenum(mdata1(:,1),'mmm yyyy'); [thrash,idx]=sortrows(d); mdata1(idx,:)

ungefär 12 år ago | 0

| accepted

Answered
MAtrix
is this what you need q=rand(2,3) % random matrix 2x3 out=sum(q,2) % sum each row so output is just 1 column for each ...

ungefär 12 år ago | 0

Answered
How to find the common values in two arrays
You need the intersect command doc intersect in your case [val,pos]=intersect(a,b) % gives common val and its posit...

ungefär 12 år ago | 14

| accepted

Answered
plot date/time from matrix
I guess u need: a={'12-Jan-2012 14:22:00' 10 '12-Jan-2012 14:23:00' 12 '12-Jan-2012 14:24:00' 13}; c=...

ungefär 12 år ago | 1

| accepted

Answered
grouping elements of a matix according to an increasing order of dates
a={ 'PDL12' '01-01-2011' [ -0.0138] 'PDL13' '01-01-2011' [ 0.3529] 'PDL12' '01-11-2009' ...

ungefär 12 år ago | 0

| accepted

Answered
parrallel computation,4-core machine
I do not think bench command is not parallelized. To make use of all the cores you need the Parallel computing toolbox and yo...

ungefär 12 år ago | 0

Answered
-nojvm option
Daniel, the -nodesktop starts MATLAB without bringing up the MATLAB desktop. *The JVM software is started*. Use the current w...

ungefär 12 år ago | 1

Answered
saving a changing variable into one table on a different row each time.
you need to save the value in a for loop This video should help: <http://blogs.mathworks.com/videos/2007/08/20/matlab-basics...

ungefär 12 år ago | 0

| accepted

Answered
run matlab function with arguments on linux terminal
Adding to Walter's answers above.. you could also try matlab -r -nodisplay -nojvm 'myfunction(argument1,argument2)'; ...

ungefär 12 år ago | 5

Answered
matlab code for adaptive thersholding
Perhaps you need to look at some resources like <http://www.mathworks.com/matlabcentral/fileexchange/8647-local-adaptive-thre...

ungefär 12 år ago | 0

| accepted

Answered
making a 341x341 matrix from a 465124x1 matrix.
465124/(341*341)=4 You will get 4 341*341 matrices from one 465124 matrix.. You could try % a is your 465214x1 matrix...

ungefär 12 år ago | 2

Answered
Converting vector to binary and summing it
dec2bin gives the output as a string.. You will need to do more processing to actually get it numerically useful..

ungefär 12 år ago | 0

Answered
how to create a standalone application in MATLAB?
Couple of useful links: <http://blogs.mathworks.com/loren/2010/11/18/deploying-standalone-applications/> -Loren's Blog <h...

ungefär 12 år ago | 1

Answered
finding the a average of matrix any better way
Don't know if this is better.. a=[2 4 5;3 2 1;2 3 8;4 1 9]; average=mean(mean(a))

ungefär 12 år ago | 1

Answered
matrix operation
q = [ 0.87 0 0 0.58 0.85 0 0.55 0...

ungefär 12 år ago | 0

Load more