Answered
Putting the content of an array cell into an xlsread command.
Two things, once you created a cellstring with the wks names, you don't need to recreate it inside the loop and always specify t...

15 years ago | 0

| accepted

Answered
matlab matrix to ascii with blank rows
Look at <http://www.mathworks.com/help/techdoc/ref/fprintf.html fprintf> Oleg

15 years ago | 1

| accepted

Answered
Solving system of 3 non-linear equations.
Rewrite as: syms xo2 xo xar eq1 = xo2 +xo +xar - 1; eq2 = 2*xo2 +xo -4*xar; eq3 = 2.063E-4*xo2 - xo^2; sol = solve...

15 years ago | 3

| accepted

Answered
Contributors metainfo: reputation and more
EDITED: deleted content (obsolete code, replaced in first post)

15 years ago | 1

Answered
Use of grouping variables in gplotmatrix
The help of <http://www.mathworks.com/help/toolbox/stats/gplotmatrix.html gplotmatrix> is: _" *gplotmatrix(x,y,group,clr,sym,...

15 years ago | 0

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
# More meta info about the contributors: num. of votes given, num. of comments... # Keep the meta info separate from answers/que...

15 years ago | 4

Answered
How do I write the code for a nonlinear system?
Then: % Create function handle f = @(x,y,bt) x^2+y^2.*bt; % Bitstream bt = randi([0,1],10,1); % Evaluat...

15 years ago | 0

| accepted

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
Small signature space at the bottom, in order to be able to customize a little bit the profile.

15 years ago | 0

Answered
How do I plot a bitstream of [1,0,1,0] on Matlab?
Other two options: %Create a a = randi([0,1],1,100) *First option* spy(a) *Second option* scatter(1:numel(a),a,...

15 years ago | 1

Answered
Contributors metainfo: reputation and more
EDITED: deleted content (old and replaced by Contributors page)

15 years ago | 1

Answered
Array minimum
A = [999 999 1 999 4 5 5 0 8 9 1]; val = min(A(A ~= 0)); find(A == val,1,'last') Oleg

15 years ago | 1

Answered
New Recursion Issue
Ok, you created *pnmnew*, but inside you call *pnm*, which in my case still doesn't handle negative _m_ or _n_ as I pointed out ...

15 years ago | 0

| accepted

Answered
Recursion Issue
Andrew, 1) Deleting your old questions and posting incrementing new ones with highly related content instead of editing the o...

15 years ago | 0

| accepted

Answered
Plotting a normal graph with a candlestick graph
I can get to this result: % Google market data from yahoo str = urlread('http://ichart.finance.yahoo.com/table.csv?s=GOO...

15 years ago | 1

Answered
movavg function lead and lag meaning
Looking at the code: % compute general moving average (ie simple, linear, etc) % build weighting vectors i = 1:lag;...

15 years ago | 0

Answered
Solving Equation
Not sure the best method, convert to function handles: syms Xell Xelr Xerl Xerr s q; s = solve('(Xell-Xelr)/(Xerl-Xerr) = ...

15 years ago | 0

| accepted

Answered
evaluating matrix in if statement
The condition: if (difference_force > tol) & (difference_displacement > tol) reads: if every value of _difference_for...

15 years ago | 0

Answered
array assignment question
I assume you wanted to do: A = zeros(4, 5); B = ones(2, 4); szA = size(A); szB = size(B); % Align to top left ...

15 years ago | 0

Answered
adding matrices inside cell array
An example: % Create dummy input c = {[1 2; 3 4], [3 3; 1 1]} c = [2x2 double] [2x2 double] % Elementwise ...

15 years ago | 3

Answered
Is there a version of STRUCTFUN that operates on structure fields that are matrices instead of scalars?
You should go a slightly different way: S(1).A = [ 1 2]; S(1).B = [ 2 4 1]; S(2).A = [ 2 2]; S(2).B = [ 2 1]; ...

15 years ago | 0

Discussion


Contributors metainfo: reputation and more
As asked by <http://www.mathworks.com/matlabcentral/answers/contributors/2710900-vieniava Vieniava> in <http://www.mathworks.com...

15 years ago | 9

Question


Contributors metainfo: reputation and more
As asked by <http://www.mathworks.com/matlabcentral/answers/contributors/2710900-vieniava Vieniava> in <http://www.mathworks.com...

15 years ago | 104 answers | 9

104

answers

Answered
Want to create a loop that gets 12 arbitrary numbers between 1-20 from the keyboard
An example of code, you can make more robust introducing more checks: % Preallocate c = zeros(12,1); % Set counter ...

15 years ago | 2

Answered
How to compare two different cell arrays ?
a = {'the', 'he', 'hate'}; b = {'he', 'hate'}; ismember(a,b) Oleg

15 years ago | 5

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
We wanna see our <http://www.mathworks.com/matlabcentral/answers/1041-how-to-make-a-list-of-user-s-reputation reputation scores>...

15 years ago | 5

Answered
How do I write in different cell locations each time xlswrite function is executed in a for loop?
Specify the range in Excel format: xlswrite(filename, M, range) To help specifying the range I use <http://www.mathworks.com...

15 years ago | 0

| accepted

Answered
Spot the NaN
Happens that P becomes NaN, and consequently DP, in: exp(-a*(DQ-b)) * exp(-exp(-a*(DQ-b))) = inf * exp(-inf) = inf * 0 = NaN ...

15 years ago | 1

Answered
Elemtwise product of a matrix and a vector with one common dimmension
bsxfun(@times,v,A) Oleg

15 years ago | 2

| accepted

Answered
How do I set properties for different vectors in a plot?
Is this what you're trying to achieve? % 3 column vectors concatenated In = cumsum(rand(10,3)); plot(In) <<http:...

15 years ago | 0

Answered
Result of strfind
I'll show an example: % Example input c = {'fine';'How are you'}; out = strfind(c,'fine') out = [1] ...

15 years ago | 3

Load more