Solved


Summing digits
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 + ...

14 years ago

Solved


Most nonzero elements in row
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...

14 years ago

Solved


Remove any row in which a NaN appears
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...

14 years ago

Answered
Function (File) Name Collision Warning
This is probably not the best solution but if you want to write a function named foo and you want to check if there is something...

14 years ago | 1

Answered
Error While Using the butter() function for IIR Butterworth filter design
This error ??? Attempt to execute SCRIPT butter as a function: E:\Academics\6th Sem\DSP Lab\Exp-8\butter.m indicates that ...

14 years ago | 0

Answered
Combining plots
You can try the following trick and see if it addresses your need. plot([0 1 nan 5 4],[0 1 nan 6 7],'DisplayName','data1') ...

14 years ago | 0

| accepted

Answered
Assigning a value to 0's
Since ColumnA is a column, you can do ColumnA(ColumnA==0) = nan

14 years ago | 0

| accepted

Answered
Integral Problem
The function f is complex valued so this may be tricky. The following page may be helpful http://www.mathworks.com/company/ne...

14 years ago | 0

Answered
MATLAB Editor Code Analyzer
The code analyzer cannot link 'x' to x because the former may just be a character and has nothing to do with the variable. You c...

14 years ago | 1

Answered
trying to make a random number sequence similar to an MLS sequence
a = 2*(randi(2,N,1)-1.5) or a = 2*(rand(N,1)>0.5)-1

14 years ago | 0

| accepted

Answered
Having array trouble
Use cell save = [save; {child}] BTW I strongly suggest you to change the variable name, save, because it is one of MATLA...

14 years ago | 0

| accepted

Answered
OOP: object setting property in a method without overriding object in workspace
In your combo1 method, do functon obj = combo1(obj) obj.pepperoni = 1; end

14 years ago | 0

Answered
HOW CAN I BROADEN MY SIN SIGNAL
Are you just looking for a sin that does not fall on an exact frequency sampling point so on the graph it seems having some kind...

14 years ago | 0

Answered
How do I generate a 5x5 plot using pcolor?
Just use A =[0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 1 1 0; 0 0 0 0 0 0; 0 0 0 0 0 0; 0 0 0 0 0 ...

14 years ago | 0

Answered
Matrix manipulation using strcmp
a = {'OL',4;'WR',7;'OL',3;'AT',2} b = a(cellfun(@(x) strcmp(x,'OL'),{a{:,1}}),:)

14 years ago | 0

Answered
PWELCH vs PSD
Hi Kevin, I must somehow interpreted that your data is only 1024 samples long, so it is only enough for one window, that's wh...

14 years ago | 0

Answered
communication system
In general, for an FMCW radar, your modulation time is couple of times longer than the time corresponding to your maximum range,...

14 years ago | 0

Answered
generate chirp signal
You can check LinearFMWaveform in Phased Array System Toolbox http://www.mathworks.com/help/toolbox/phased/ref/phased.linearf...

14 years ago | 0

Answered
polyphase code
You can check the PhaseCodedWaveform in Phased Array System Toolbox http://www.mathworks.com/help/toolbox/phased/ref/phased.p...

14 years ago | 0

Answered
2nd order ODE using RK4
You can use |ode45|. You first define a function for your differential equation function dy = myode(t,y) dy = zeros(2,1)...

14 years ago | 0

Answered
xtick string with plot yy
replace the call to |plotyy| with following: h = plotyy(time,data1,time,data2); set(h,'XTickLabel',''); set(h,'XTick'...

14 years ago | 2

| accepted

Answered
search for rows of a matrix within bigger matrix (without for loop)
[C,IA] = intersect(A,B,'rows') or [tf,rowA] = ismember(B,A,'rows') see doc intersect doc ismember

14 years ago | 1

| accepted

Answered
create plot without x y data, draw plot line just like paint on matlab
Are you looking for something like this? plot(1:10,rand(1,10)) axis off

14 years ago | 0

Answered
3D space and coordinate reference systems
Then you can just use |plot3| doc plot3

14 years ago | 0

Answered
How to concatenate two matrices
z = [x;y]; z = z(:).'

14 years ago | 0

| accepted

Answered
3D space and coordinate reference systems
You can use |quiver3|, e.g. quiver3(zeros(3,1),zeros(3,1),zeros(3,1),[1;0;0],[0;1;0],[0;0;1]) For details, see doc ...

14 years ago | 4

Answered
How can you change the colour of the plot when using scatter function?
The syntax of scatter(x,y,s,c) supports |c| being a 3-ciolumn matrix where each row is a combination of RGB values, e.g...

14 years ago | 0

Answered
While Loops (HELP!!)
You need to update your Y in each loop otherwise time goes by and the altitude of the skydiver never changes. See the equation i...

14 years ago | 0

Answered
matalab figures questions
Not sure if I understand your question correctly, but this can probably get you started For the first question, try axis...

14 years ago | 0

Answered
syntax help
h1 = h1';

14 years ago | 0

| accepted

Load more