Mechanical Engineer

Professional Interests: Aerospace, Data Analysis, Musical Acoustics

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

3 years ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

3 years ago

Solved

Sum all integers from 1 to 2^n

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.

3 years ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

3 years ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

3 years ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

3 years ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

3 years ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

3 years ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

3 years ago

Question

Prompt user before clearing axis when using the "clear axes" context menu

Today one of my users inadvertently selected "Clear Axis" (he was aiming for "Paste") while using a tool I wrote and maintain. T...

3 years ago | 5 answers | 2

Question

Help reducing huge time overhead when executing system() or unix() commands from Matlab function

I have a data processing program that goes through gigabytes of .csv text. The approach I've been taking is to use grep (Mac or ...

3 years ago | 1 answer | 0

Answered

Running Applescript during MATLAB code

Hi, Regan, It looks like the issue is with paths on OSX and not Matlab. That error is because OSX's |osascript| can't find th...

Running Applescript during MATLAB code

Hi, Regan, It looks like the issue is with paths on OSX and not Matlab. That error is because OSX's |osascript| can't find th...

4 years ago | 0

| accepted

Answered

How can I graph this matrix?

As KSSV said, we need to know what you mean by "graph the matrix." Your code will definitely make a line, though. From the do...

How can I graph this matrix?

As KSSV said, we need to know what you mean by "graph the matrix." Your code will definitely make a line, though. From the do...

4 years ago | 0

Answered

Plot out of cell array with attributes

I think you are looking for |gscatter|, which allows you to define a "group vector" and then define different styles for each gr...

Plot out of cell array with attributes

I think you are looking for |gscatter|, which allows you to define a "group vector" and then define different styles for each gr...

4 years ago | 1

Answered

Function inside MATLAB Gui code not outputing variable

Morgan, Sorry if it seemed like we were asking you for something you already gave us, but the entirety of the error message i...

Function inside MATLAB Gui code not outputing variable

Morgan, Sorry if it seemed like we were asking you for something you already gave us, but the entirety of the error message i...

4 years ago | 1

| accepted

Answered

How do I plot a line graph from two for loops?

If you want to do a simulation where you are stepping forward in time, I suggest saving the results of each timestep so when you...

How do I plot a line graph from two for loops?

If you want to do a simulation where you are stepping forward in time, I suggest saving the results of each timestep so when you...

4 years ago | 1

| accepted

Answered

How do I put minor ticklabel on and ticklabel off ?

I'm a dummy - I completely forgot about |HideEndTicksIfOutside| ! Setting this to 'on' will hide both the Major tick mark and...

How do I put minor ticklabel on and ticklabel off ?

I'm a dummy - I completely forgot about |HideEndTicksIfOutside| ! Setting this to 'on' will hide both the Major tick mark and...

4 years ago | 0

Answered

How do I put minor ticklabel on and ticklabel off ?

Ok, I have a possible workaround. It doesn't truly answer your question, but it might still achieve your aim? You could shif...

How do I put minor ticklabel on and ticklabel off ?

Ok, I have a possible workaround. It doesn't truly answer your question, but it might still achieve your aim? You could shif...

4 years ago | 0

Answered

Define vector to use for colorbar

Ok, I spend some time with this and I think i see what's happening. It all boils down to the way you define the CData property o...

Define vector to use for colorbar

Ok, I spend some time with this and I think i see what's happening. It all boils down to the way you define the CData property o...

4 years ago | 3

| accepted

Answered

I have created a subplot with many different diagrams. Now i want to set the coordinates range.

Philip, I am unable to reproduce your issue with | axis ([ -500 500 0 222])| changing the limits of all plots. However, yo...

I have created a subplot with many different diagrams. Now i want to set the coordinates range.

Philip, I am unable to reproduce your issue with | axis ([ -500 500 0 222])| changing the limits of all plots. However, yo...

4 years ago | 0

| accepted

Answered

Where to format plot?

look at the axis property ax.NextPlot. During axes creation, I believe this is set to 'replace' by default. When some o...

Where to format plot?

look at the axis property ax.NextPlot. During axes creation, I believe this is set to 'replace' by default. When some o...

4 years ago | 1

Answered

Define vector to use for colorbar

Joel, I don't know about a vector, but you can set upper and lower limits. It looks like you are saving a handle to the color...

Define vector to use for colorbar

Joel, I don't know about a vector, but you can set upper and lower limits. It looks like you are saving a handle to the color...

4 years ago | 0

Answered

changing the x axis candle stick chart

Sorry, it looks like I misunderstood your issue. Without seeing what your variables are (data types, sizes, etc) it's a little t...

changing the x axis candle stick chart

Sorry, it looks like I misunderstood your issue. Without seeing what your variables are (data types, sizes, etc) it's a little t...

4 years ago | 1

| accepted

Answered

Delete Entries in Cell arrays with a certain criterea

This is messy, but here is an example. I'm sure there's a slick way to do this with logical indexing, but I can't quite wrap my ...

Delete Entries in Cell arrays with a certain criterea

This is messy, but here is an example. I'm sure there's a slick way to do this with logical indexing, but I can't quite wrap my ...

4 years ago | 0

Answered

Create a uitable with dynamic rows in GUIDE

You can define a default row cell and use repmat() to build a cell array of the size you want: i = 7 defaultRow = {[],[]...

Create a uitable with dynamic rows in GUIDE

You can define a default row cell and use repmat() to build a cell array of the size you want: i = 7 defaultRow = {[],[]...

4 years ago | 0

| accepted

Answered

Error when using legend or clicking on the plot

It looks like you have overloaded allchild.m Enter "which allchild.m" in the command window. You should see something like t...

Error when using legend or clicking on the plot

It looks like you have overloaded allchild.m Enter "which allchild.m" in the command window. You should see something like t...

4 years ago | 0

| accepted

Answered

how do i solve this coding problem?

when you write an expression like (x4 < x1) when both x4 and x1 are sym objects, Matlab builds a new symbolic expression. It doe...

how do i solve this coding problem?

when you write an expression like (x4 < x1) when both x4 and x1 are sym objects, Matlab builds a new symbolic expression. It doe...

4 years ago | 0

Answered

pressing key within mfile function

Afsoon, Without your function's code, it's a bit of a guess, but I think your issue probably has to do with variable workspac...

pressing key within mfile function

Afsoon, Without your function's code, it's a bit of a guess, but I think your issue probably has to do with variable workspac...

4 years ago | 0

Answered

why my output not display?

Walter is spot-on that the .m file is really needed for specific help. If I read your problem description correctly, you are try...

why my output not display?

Walter is spot-on that the .m file is really needed for specific help. If I read your problem description correctly, you are try...

4 years ago | 0