Solved


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

12 years ago

Answered
Importing excel spreadsheet into Simulink (configuration parameters pane)
Could you just import it into MATLAB (completely outside of Simulink) using the Import tool or importdata or xlsread and then wr...

12 years ago | 0

Answered
Plotting data from a mat file that is a struct
S = load('filename.mat'); plot(S.times,S.counts); Doc: <http://www.mathworks.com/help/releases/R2013b/matlab/structur...

12 years ago | 1

Answered
Experience and Tips on colormap for waterfall plots?
<http://www.mathworks.com/matlabcentral/fileexchange/28982-perceptually-improved-colormaps>

12 years ago | 0

| accepted

Answered
Sort columns by maximum value?
x = [5 -2 3 -10 6 2 0 0 1] [~,idx] = sort(max(x)); y = x(:,idx)

12 years ago | 0

Solved


remove nans fast
There are several ways to locate and remove nans in a matrix, and return an 1d row vector. In this problem the challenge is ...

12 years ago

Answered
Error while using size(A,1)?
You have a variable names |size|. Rename this variable and clear it.

12 years ago | 0

| accepted

Answered
skip an unit test
To filter tests, you use an "assumable" qualification in your Test Method. <http://www.mathworks.com/help/releases/R2013b/mat...

12 years ago | 2

| accepted

Answered
Is it possible to model discrete populations using ode45?
It sounds like you will need to include an event that happens when Y <= 1. <http://www.mathworks.com/help/releases/R2013b/mat...

12 years ago | 0

Answered
How can I publish all the sub-functions, sub-sub-functions, etc. into a single html/pdf file?
<http://www.mathworks.com/matlabcentral/fileexchange/33476-publish-dependent-and-called-functions> May help.

12 years ago | 0

Answered
randomly generated non-intersecting ellipses
<http://www.mathworks.com/matlabcentral/fileexchange/7844-geom2d>

12 years ago | 0

Answered
How do I prevent struct2handle from failing after a call to clear classes?
Any reason to avoid |hgload| and |hgsave|? figHndle = figure(); plot(1:10); hgsave(figHndle,'FigureStruct.mat'); cl...

12 years ago | 0

Answered
Why isn't the editor remembering my tile layout
I'm able to reproduce this in 13b. If your organization is subscribed to SMS you can download the 14a prerelease which you migh...

12 years ago | 0

Answered
fminunc on multiple variables
Objective functions expect all of the variables being optimized to be in "x" myfun(x,a,b,c) Where x is now a 1x3 vector....

12 years ago | 0

Answered
Hidden gems in Matlab's toolboxes
Jan, if you really like |uisetcolor|, another one which I just learned about is |inspect|: figure; h = uicontrol('Style','...

12 years ago | 1

Answered
How to troubleshoot Out of memory Error for this simple case ?
<http://www.mathworks.com/help/releases/R2013b/matlab/matlab_prog/resolving-out-of-memory-errors.html>

12 years ago | 0

Answered
scrolling down in command window
Are you looking for the |home| command? >> home This will look like clc but will not clear out the command window.

12 years ago | 2

| accepted

Answered
Is there an elegant way to do a "flip-flop" sort from the middle or near the middle?
n = 7; v = [n:-2:1, 2:2:n]

12 years ago | 0

| accepted

Answered
creating a diagonal matrix?
diag(q(1,2,3)) And for more info: doc diag

12 years ago | 0

Answered
Why doesn't it work, mixing arrays with non-array cumulative in a loop
_mult1,culmG,alpha_ are not defined as variables or functions. Thus you need to define them after the |clear all|. pwidth=...

12 years ago | 0

Answered
How to assign probability to a matrix element?
x = rand(m,n) > p Just compare a random value to p.

12 years ago | 0

| accepted

Solved


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

12 years ago

Answered
questions on assigning values from a vector
This is generally recommended against as it is much easier (not to mention faster) to manipulate a 1xn vector x than dealing wit...

12 years ago | 1

Answered
selecting randomly an array from multiple arrays
doc randperm

12 years ago | 0

Answered
Passing Matrix using call by reference
What operation are you doing inside of |myfunc|? Is it elementwise? If so, MATLAB will do the operation in place if x is name...

12 years ago | 1

Solved


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

12 years ago

Answered
I wanna assign predetermined value in specific cell in uitable which created in GUI.
Doug just made a video for this :) <http://blogs.mathworks.com/videos/2013/12/03/matlab-manipulating-the-data-in-a-uitable-in...

12 years ago | 0

Answered
finding headerline and transformation
Use |flipud| or, in R2013b or greater, |flip|. I = imread('1.jpg'); imshow(flipud(I)) And: doc flipud

12 years ago | 0

Answered
Image segementation of cement paste complex structure!
There are a few things a little weird about your image: # First, for a CT image, I'd expect the background to have a lower in...

12 years ago | 1

Answered
Issue with Mac, Linux and windows portability with ls and sprintf commant
Use |filesep| and |pathsep| instead of '/'. These will generate the appropriate separator for the path. doc filesep Or ...

12 years ago | 1

Load more