Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

2 years ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

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

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

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

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

2 years ago

Solved

Determine if input is odd

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

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

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

2 years ago

Question

Remove NaNs in matrices within cell array

I have a matrix that has some data in its columns like this: A = [1 NaN NaN 1 1; NaN NaN NaN 1 NaN; 1 1 NaN 1 NaN] I wa...

3 years ago | 7 Answers | 0

Answered

rotate3d in GUI

Yes it is possible. Just make a uicontext menu like in the example here: http://www.mathworks.se/help/techdoc/ref/uicontex...

rotate3d in GUI

Yes it is possible. Just make a uicontext menu like in the example here: http://www.mathworks.se/help/techdoc/ref/uicontex...

4 years ago | 1

| accepted

Responded

Re: Drag zoom -functionality without mouse?

Thank you very much for the fast reply Steve. Using axis seems to do the trick. I guess there's some things that need updating ...

4 years ago | 1965 views

Posted

Drag zoom -functionality without mouse?

I'm having some weird problems when I try to manually zoom into a plot by changing the axes's 'XLim' and 'YLim' properties. The ...

4 years ago | 1965 views

Responded

Re: Symbolic Text in uicontrol

It's been almost 10 years. I wonder if this problem has a reasonable solution already? I'm doing and a sorft of a movie player...

5 years ago | 2662 views

Posted

text problem with opengl

Hello, I'm using opengl as a rendere since I need transparent patches. I'm very puzzle why the following does not seem to wo...

5 years ago | 1100 views

Responded

Re: Editing a structure array

This is exactly what I was looking for. Thank you (yet again) Bruno!

5 years ago | 838 views

Responded

Re: Editing a structure array

To be more precise I'm looking for a command like >>patients(:).name = "John Doe"

5 years ago | 838 views

Posted

Editing a structure array

Hi all, I have a structure where I have saved some information much like in the patient example here: http://www.mathworks.se...

5 years ago | 838 views

Responded

Re: GUI screen size problem

Problem solved. For some reason, the figure height is changed, in my case from 864 to 826 pixels, when the figure is created. ...

5 years ago | 3895 views

Posted

GUI screen size problem

Hi all, I made a quite complex gui (without guide) with window size of 1152x864 (xga+) pixels. The display I use has 1920x1200...

5 years ago | 3895 views

Responded

Re: problem saving a plot with surface

Facepalm. I tried to change the background color before, but for some reason only applied it to the axes. Thank you Oliver. ...

5 years ago | 3020 views

Posted

problem saving a plot with surface

Hello, I've made a plot with surface (a map) and then plotted some objects with transparency (AlphaData) to the plot. I'm tryi...

5 years ago | 3020 views

Responded

Re: meshgrid with constant y

btw, sorry for the typpos. I can't copypaste from my actual workstation...

6 years ago | 3299 views

Responded

Re: meshgrid with constant y

To make things more complicated, I'd like the surfaces to face the camera when using rotate 3d. Just like in those old first per...

6 years ago | 3299 views

Responded

Re: meshgrid with constant y

I tried to look more carefully into fill3 and patch but there's no mention of how to put a image on these things. I have been ...

6 years ago | 3299 views

Posted

meshgrid with constant y

Hi, I'm trying to plot an image to "a wall" in my 3d plot with surface -function. How ever I'm unable to form the required ...

6 years ago | 3299 views

Responded

Re: LOADING AND READING EXCEL SHEETS

Seems to me that one solution could be to use xlsread (>> help xlsread). I'd do the calculations in matlab after the importing...

6 years ago | 1141 views

Responded

Re: How to determine a structure is empty or not?

Quick and possibly dirty solution could be to check if there's any fields in the struct. For example: ans =

6 years ago | 31261 views

Responded

Re: How to stop GUI's from appearing

Could you set the 'Visible' property of the gui-window to 'off' when you don't want it to pop up? For example build the gui wi...

6 years ago | 1505 views