Community Profile

Contact

http://uwstudents.uwyo.edu/gpai 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. ...

2 Answers

6

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...

3

Answered 4 years ago

Hello all, Recently I came to know that it is not a good idea to use clear all; So, I started using clear varia...

1

Hello, 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...

0

Asked 1 year ago

Hello All, This is not a MATLAB question but I would really appreciate any comments. In my experience, outlook blocks .mat...

3 Answers

2

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 ...

1 Answers

see code: In a certain power system simulation, I am naming my outputs (typically more than one, a linear MIMO simulation) in t...

4 Answers

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...

accepted

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, for i=1:10000 A(i,:...

Hello all, 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...

Asked 3 years ago

>> 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...

Solve this!

3 years ago

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

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 A = 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".

Remove all the vowels in the given phrase. Example: 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. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

Check if sorted. Example: 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.] Non-scor...

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. Example: 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. Example...

4 years ago

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...

Load more