Answered
how to divide each row of a cell by maximum number
m = csvread('yourfile'); m = bsxfun(@rdivide, m, max(m, [], 2)) %divide each row by the max of the row Note that the ne...

10 years ago | 1

| accepted

Answered
/ / / /
1. You really need to learn a modicum of matlab. The code you've posted is in no way valid matlab syntax 2. Do not use |ans| ...

10 years ago | 0

Answered
Accessing array elements, vector wise
You need to use |sub2ind|: A{t}(sub2ind(size(A{t}), i, j))

10 years ago | 0

| accepted

Answered
concatenate vertically along the 3rd dimension of a matrix
splitA = num2cell(A, [1 2]); %split A keeping dimension 1 and 2 intact vertcat(splitA{:})

10 years ago | 7

Answered
How to extract matrix elements corresponding to row and column subscripts stored in cell arrays
First, note that with your code you've got an anonymous function wrapped inside an anonymous function. Either of the following w...

10 years ago | 1

| accepted

Answered
Help needed with the find function
Note that using indices = find(x == min(x)) only makes sense if you have several values equal to the minimum and you wan...

10 years ago | 0

| accepted

Answered
Extracting field values from cell array of structures
Assuming that all cells of the RP_Cell cell array only contain a scalar structure with the same fields in the same order, you ca...

10 years ago | 2

| accepted

Answered
Function fileread reads some values wrong
_"all characters with hex value 0x96"_. As far as I can tell, these hex values are not characters in any standard text encoding....

10 years ago | 0

| accepted

Answered
How to kill error dialog ?
The application terminated dialog is generated by Windows and at this point your application does not have control anymore. In b...

10 years ago | 0

Answered
Trying to preserve the internal old mat file date
Considering that there's no function in matlab that can read this creation date, why do you care? There is also no function t...

10 years ago | 1

| accepted

Answered
Make Field of certain size in structure using a loop
Your |batch_list| is a 1x2 cell array, therefore, in |batch_list{j, i}|, the maximum acceptable value for |j| is 1 and the maxim...

10 years ago | 0

| accepted

Answered
How can I add a matrix to the end of another matrix in a loop
No need for a loop: c = {[1;2;3], [4;5;6;7], [8;9;10;11], [12;13;14]} %using 3x1 and 4x1 instead of 294x5 and 295x5 for de...

10 years ago | 0

| accepted

Answered
How to crack MD5 using matlab
_"can any one help me to crack the code that I attached"_ You'll have to explain what that means. There is nothing to _"crack"_ ...

10 years ago | 2

Answered
Accessing all the values of a specific structure field in a matrix of structure to a cell array.
for x = 1:N %I'm not sure why you used RList(1, :) which will result in an error %if numel(Rlist(1, :)) ~= numel(f...

10 years ago | 0

| accepted

Answered
How to I lock what date 'today' is?
Well, the simplest solution is to not ask for today's date several times. You've already got the date you want. Why can't you us...

10 years ago | 0

| accepted

Answered
Filter excel files by sheetnames
Assuming that |filepath| is just a list of folders (no filename) and |filelist| is the corresponding list of files (just filenam...

10 years ago | 0

| accepted

Answered
Sort Excel files by file content?
You could certainly inspect the content of the excel files to see if there's the worksheet you want. However, since it involves ...

10 years ago | 1

| accepted

Answered
Designing a container to store a structure
Please heed my comments about variable names. |x|, |y|, |f| etc. are completely useless variable names. They don't describe anyt...

10 years ago | 0

| accepted

Answered
Extract data from "txt" and "htm" files
For the text file, the following would work to extract the required section: wholetext = fileread('champlain-485apos.txt');...

10 years ago | 0

Answered
How to write a changing table name in setdiff function?
Despite what's been suggested, there is no need to convert the tables to cell arrays (and lose information such as column and ro...

10 years ago | 0

| accepted

Answered
Compare strings and use data
To find the column location of your three channels in the list of channels you would use <https://www.mathworks.com/help/matlab/...

10 years ago | 0

| accepted

Answered
Copy graphs from Excel to GUI
Excel charts and matlab figures are two very different beasts. There is no easy way to convert one to the other. As per Geoff...

10 years ago | 1

| accepted

Answered
How do I remove the numbers from a cell that contains both numbers and strings?
You could use a <http://www.mathworks.com/help/matlab/matlab_prog/regular-expressions.html regular expression>. This would work ...

10 years ago | 0

| accepted

Answered
What is code for opening excel document in Matlab GUI for macbook?
You use the same <http://www.mathworks.com/help/matlab/ref/xlsread.html |xlsread|> (or <http://www.mathworks.com/help/matlab/ref...

10 years ago | 0

Answered
creating structures in nested for loop
The problem has nothing to do with structures. You're using an non-integer |b| as a subscript into a matrix (of structures in th...

10 years ago | 0

| accepted

Answered
interpolate data in cell array
Possibly, this will do what you want: %A and B: cell arrays of matrices. Must have the same size %Matrices in correspond...

10 years ago | 0

| accepted

Answered
Extracting Multiple .txt files contained in a folder to separate tabs in excel
One quick way: folderpath = 'c:\some\mockfolder'; filelist = dir(fullfile(folderpath, '*.txt')); %get list of file ...

10 years ago | 0

Answered
Program the colormap of a graph using different colors for different ranges
My suggestion would be to inverse the problem: Have a simple colour map with just your six entries and discretise your |x| so th...

10 years ago | 0

Answered
why complex value appears in this array
|A < B < C| is not how you check if |B| is between A and C. The proper way to do this is: if A < B && B < C When you wri...

10 years ago | 1

| accepted

Answered
How do I find 4 or more consecutive zeros and replace these zero's?
Here is one way to do it, which does not involve looping over the whole vector (only over each run of zero) transitions = d...

10 years ago | 0

| accepted

Load more