Answered
What is the meaning of Adding a String to a Double?
Strings are represented as integer values. A = 65, B = 66... You can ADD numbers, say, 65 + 1, and you would get 66, whi...

11 years ago | 0

Answered
How to loop and calling data from excell
Roughly you want something like this: [n t r] = xlsread(filename); for i = 1:number_of_columns col = [r{startrow:end...

11 years ago | 0

Answered
Is it possible to convert a word documenet to an .xls file using matlab code? If so, can you help or refer me to a link that will help me do that
Possible? Yes. Sensible? No. You'll need to interact with word and excel via active x controls. If you look at the code for x...

11 years ago | 0

| accepted

Answered
I use MATLAB 2011. Related to the questions I asked yesterday. How to save plots and work space to a folder automatically that come in a loop.
for i = 1:n ... code filename = [somepath '\' somefilename num2str(i) '.png']; saveas(figure,filename) filename = [...

11 years ago | 1

| accepted

Answered
how to measure angle between the lines?
diff = (atan((y(2)-y(1))/(x(2)-x(1))) - atan((b(2)-b(1))/(a(2)-a(1)))) * 180/pi;

11 years ago | 1

| accepted

Answered
How can I modify and return variables between GUIs?
You can pass them in the same way that functions pass variables around: "Global" variables Passing arguments Putting t...

11 years ago | 0

| accepted

Answered
Identify the mode in each column and eliminate them
a = a'; out = reshape(a(a~=2),[],3)'; That will work for your example, but not necessarily what you're dealing with.

11 years ago | 0

Answered
Variable user inputs (ie test numbers) to be used in a function
Don't use the command line unless you REALLY have to. list = {}; more = true; while more string = input('enter you...

11 years ago | 0

Answered
XLSWRITE - into same folder location as M file
[p f] = fileparts(mfilename('fullpath')); xlswrite([p '\excel filename.xls'], ...)

11 years ago | 1

Answered
is there any command to find a maximum value of a matrix containing negative numbers also ??
No single line command, but largest_val = (-min(x) < max(x))*(max(x)-min(x))+min(x); is cheeky and it preserves the sig...

11 years ago | 3

Answered
Matrix problem, iterative matrix calculation
I think you are asking how to make your entire matrix zero, by adding columns of data that already exist. while any(A) ...

11 years ago | 0

Answered
How to access the minor of a matrix.
big = randn(1000,1000,4); small = big(n:n+m,o:o+p,q:q+r); small is an m+1 x p+1 x r+1 matrix, which was taken starting a...

11 years ago | 1

| accepted

Answered
To David Sanchez. Thank you very much for the answer. If you don't mind please elaborate it.
a = dir('C:\Users....\Data\*.dat'); for i = 1:numel(a) filename = ['C:\Users...\Data\' a(i).name]; ... code to read fil...

11 years ago | 1

| accepted

Answered
How to write characters into a new line in text file?
fid = fopen(filename,writeaccess); fseek(fid, ...) fwrite(fid,['Hi' 13 10 'World'],'char'); ... fclose(fid) Thats t...

11 years ago | 0

Answered
Why Fread a 2 GB file needs more than 8 GB of Ram?
As Jan implied, passing around variables often leads to memory duplication - 2GB arrays get COPIED when put into functions. ...

11 years ago | 0

Answered
MATLAB help always showing true to if condition
Do A, B, C, and D actually have those strings in them, EXACTLY like what you're comparing them to? I suspect they have a diff...

11 years ago | 0

Answered
Obtaining elements of a vector from a nested Cell Array
Try a three dimensional cell array ParameterCellArray{row, column, deep} deep = 1, to get the 'a','b', etc., deep = 2 to...

11 years ago | 0

Answered
I want to initialize a very large character array with the same character string
char_array = char(ones(N,1) * 'String'); cell_version = repmat({'String'},N,1);

11 years ago | 3

Answered
Standard deviation of peak values
Yuo can get the peak value with: peak = max(curve); You can calculate a standard deviation with: sigma = std(samples)...

11 years ago | 0

Answered
Performing a loop of data structure array
Only use one for loop. for n = 1:1:3 m = n + 1; ... code end

11 years ago | 0

| accepted

Answered
Convert [4,5] to D5 for excel write
coordinate = ['A'-1+wanted_col num2str(wanted_row)]; It only works for up to "Z".

11 years ago | 0

Answered
How to automatically concatenate several .mat files into one file?
Mat files aren't easy to concatenate UNLESS they contain different variables. The code, in that case, would be: load(file...

11 years ago | 0

Answered
How can I get pixels info like the function "impixel", but for multiple pixel?
plot(squeeze(image(:,column,1)),'r') hold on plot(squeeze(image(:,column,2)),'g') plot(squeeze(image(:,column,3)),'b') ...

11 years ago | 0

Answered
How to export datas from Matlab to a specified cell in Excel ^^
xlswrite(filename, data, sheet, top-left cell)

11 years ago | 1

| accepted

Answered
Euler's Method check
You've implemented euler's method correctly. Whether or not you have calculated k11 and k12 correctly, and chosen sensible value...

11 years ago | 0

| accepted

Answered
How to find two local slopes in an arbitrary curve?
The general expression to calculate "slope" is (y2 - y1) / (x2 - x1) If you have a vector of "y" values and "x" values of the...

11 years ago | 0

Answered
how to find short pause in a sentence ?
If you have the sentence as a string: eg. Str = 'She was dancing, singing, laughing in the party.'; You can get the index...

11 years ago | 0

Answered
Is there any easy way to change x*y production to x.*y production?
Find and replace?

11 years ago | 1

Answered
Indexing within two for loops where the index can be below zero
list1 = 0:1:16; list2 = 0:0.5:8; list3 = -45:1.23:45; c = 0; for i = 1:numel(list1) val1 = list1(i); for j = 1:nu...

11 years ago | 0

Answered
How to append underscore to name of image?
You can concatenate strings: ['hello' ' ' 'world' '_' 'a' '.jpg'] ['name' '_' num2str(number)] etc.

11 years ago | 0

| accepted

Load more