Professional Interests: signal processing, system identification, power system stability studies
Top 1% contributor
Here is a small script that I wrote after I missed a colon and saw some unexpected (by me) behavior in some work I was doing.
Asked 4 years ago
I would put the files on my personal website or dropbox public folder and share a link ( <http://www.dropbox.com>). In both case...
Answered 4 years ago
Recently I came to know that it is not a good idea to use
So, I started using
Asked 3 years ago
This is perhaps one of those "I-know-the-answer-still-I-ask" questions. Today, I had a strange error in one of my scri...
Asked 11 months ago
This is not a MATLAB question but I would really appreciate any comments.
In my experience, outlook blocks .mat...
Asked 2 years ago
I use Matlab 7.12.0 R2011a, on a Windows XP SP3 box. I am trying to use the publish feature of Matlab to automatically create a ...
In a certain power system simulation, I am naming my outputs (typically more than one, a linear MIMO simulation) in t...
This may sub-optimal but definitely a start. I would find the zero crossings of each as a vector of 1's and 0's and add them. Th...
Answered 2 years ago
A = 4;
Z = [1 9 2 3 4 5]
Z1 = Z(find(Z~=A))
that should work
Like Sean said, convert all variables to some floating point format.
You might do something like,
I am in a simple situation with an error that doesn't tell you a whole lot. I have a plot that I want to save as a...
>> fprintf('%4d, %1.6f, %1.6f\n',1, 1.1, 1.2)
1, 1.100000, 1.200000
>> disp(fprintf('%4d, %1.6f, %1.6f\n',1, 1.1, 1.2)...
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...
2 years ago
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.
Given the number x, y must be the summation of all integers from 1 to 2^x.
For instance if x=2 then y must be 1+2+3+4=10.
Given a matrix, find all elements that exist in every row.
For example, given
1 2 3 5
9 2 5 9
3 2 5 9
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
3 years ago
Remove all the vowels in the given phrase.
Input s1 = 'Jack and Jill went up the hill'
Output s2 is 'Jck nd Jll wn...
Given n, find the sum of the digits that make up 2^n.
Input n = 7
Output b = 11
since 2^7 = 128, and 1 + ...
Check if sorted.
Input x = [1 2 0]
Output y is 0
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
There will always be at least one prime in the matrix.
Input in = [ 8 3
5 9 ]
Output out is 4...
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...
Join the conversation