Answered
Can anybody spot the error in this simple program?
This 100>= score >= 0 doesn't do what you think it does. 100>= score either evaluates to 0 or 1, so you then compare ...

14 years ago | 1

Answered
how to skip from one line to another?
It can be done: <http://www.mathworks.com/matlabcentral/fileexchange/26949-matlab-goto-statement> But please do not. Just bit...

14 years ago | 0

Answered
Here simple code keeps freezing my matlab, guess why?
It runs just fine for me if I remove the roundn call (as I don't have that function/toolbox/version). Given your propensity t...

14 years ago | 1

| accepted

Answered
Guide- coma
Generally we like to see that you have put effort into trying to solve your problem. It looks like you have been trying things h...

14 years ago | 1

| accepted

Answered
Efficient Row x Collumn multiplication
I am posting this as a separate answer. First when using timing, MATLAB has a hard time timing things that take only 0.000065 se...

14 years ago | 0

Answered
Efficient Row x Collumn multiplication
Maybe I am missing something here, but it seems like you already have a solution ... x = zeros(s, 1) for i = 1:s x(...

14 years ago | 0

Answered
Inserting Zeros in a Matrix
Based on the additional information in your comment, you have x (160x1) and you want a function that will take in some offset b ...

14 years ago | 1

Answered
butterworth filter
Depending on how many filters you need and their orders, you may be able to calculate the coefficients by hand. You will probabl...

14 years ago | 0

Answered
including subject_name in variable with a loop
You can do it with eval, but then in a few days you will be back asking how to use the variables. This is a FAQ, and is generall...

14 years ago | 1

Answered
error in a loop
Just like the error says the number of elements in B and in I must be the same. For you, B is x1+r.*cos(theta) with the ...

14 years ago | 0

| accepted

Answered
merging the matrices
reshape([A B]', 3, 6)' ans = 1 5 10 25 1 2 10 20 30 2 5 9 2 ...

14 years ago | 0

| accepted

Answered
finding an item in an array
One of my uglier solutions ... x = [1 2 2 2 4]; a = unique(x); [~,b] = unique(x, 'first'); [~,c] = unique(x, 'last...

14 years ago | 0

Answered
Passing indexed variable value to be stored in cell array rather than reference
I think you have what you want. It just doesn't display the way you expect it to. Consider this simplified example n = 3; ...

14 years ago | 1

Answered
how to use indexing in array of objects?
I think arrayfun is essentially a loop. I think the "MATLAB" way would be to overload subsref and subsasgn. That said, I ...

14 years ago | 0

Answered
What is it better?
I hope this is not homework ... With only a single for loop you make the tool==1 comparison length(GR) times, while in the du...

14 years ago | 1

Answered
structure conversion
Is this what you mean? x = 1:3; x.x = x; or maybe I should be kinder about the variable names ... a = 1:3; b....

14 years ago | 0

Answered
Running Matlab remotely
While David has a working solution. Three other options are: Create a symbolic link to the matlab binary in /usr/bin sud...

14 years ago | 0

Answered
Function referring to abstract class
I think the key piece is: _not every layer needs to have an interface assigned -- it might just pick up those from adjacent l...

14 years ago | 1

Answered
Multi processor
MATLAB will use all the cores of your CPU if it can. Some calculations are not CPU limited, so you might not see maximum usage. ...

14 years ago | 0

Answered
Increase memory used by Matlab
If memory is available and MATLAB can benefit from it, MATLAB will uses it. When MATLAB doesn't need the memory anymore, it give...

14 years ago | 0

Answered
How can I test a successful installation of MATLAB?
For Linux systems in particular there tend to be issues with # fonts in figures <http://www.mathworks.com/matlabcentral/answe...

14 years ago | 0

Answered
manage a list of instances of a class
Your node list seems to me to be related to the doubly linked list example: <http://www.mathworks.co.uk/help/techdoc/matlab_oop/...

14 years ago | 0

Answered
callback within the class?
It seems like all the properties other than b and h should be dependent. This would allow you to get rid of the update method. I...

14 years ago | 0

| accepted

Answered
How to do this in MATLAB without for loops
What about using an Nx4 matrix (or a cell array) instead of x1, x2, ... In general x1, x2, ... naming is a bad idea: <htt...

14 years ago | 1

Answered
how to make an envelope of a signal?
You could use the Hilbert Transform.

14 years ago | 0

Answered
functions vs. script
While I wouldn't term it private/public, the unique workspaces that you hint at in pro 1 is the real selling point to me. With a...

14 years ago | 5

Answered
mp3
The FEX is your friend: <http://www.mathworks.com/matlabcentral/fileexchange/13852-mp3read-and-mp3write>

14 years ago | 1

Answered
How to make the conversion more faster?
The easiest thing is probably to use a faster computer. A quick look at csdigit doesn't reveal anything to me that is obvious...

14 years ago | 0

Question


'123'-'0' vs [1,2,3] and mtree
This is a Cody inspired question. From what I understand, the odd looking '123'-'0' has fewer programming nodes in the p...

14 years ago | 2 answers | 0

2

answers

Answered
What do you think of Cody, new service for MATLAB Central
I tried Cody when it first came out. At that time it appeared to be about two things: solving problems and writing "good" code. ...

14 years ago | 2

Load more