Question

Why is scatter so slow for variable marker size?

I found something very strange and annoying. The following code generates 1000 points randomly in the plane, then moves them a b...

11 months ago | 0 answers | 0

Question

Is there a way to control distortion in Matlab's 3D viewer?

The background of this problem relates to my attempt to combine output from a ray tracer with Matlab's 3d plotters. When doing r...

4 years ago | 2 answers | 0

Question

Is there a way to obtain light intensity information when lighting a surface?

Suppose we create a very basic surface and single-faced lighting. peaks(10) light <</matlabcentral/answers/uploaded...

4 years ago | 0 answers | 0

Question

mex unable to find an include file

I'm trying to use mex to compile a file, but it does not seem to be able to find an include file. I am using the test file yprim...

4 years ago | 1 answer | 0

Answered

Three ways to do the same integration leading to three different speeds: why?

This is a later 'answer' added to complement the above answers about the overhead in concatenating arrays and modularizing via f...

Three ways to do the same integration leading to three different speeds: why?

This is a later 'answer' added to complement the above answers about the overhead in concatenating arrays and modularizing via f...

5 years ago | 0

Question

Three ways to do the same integration leading to three different speeds: why?

Here is a code that does the trapezoid rule applied to a function on [0, 100] and where I use a random vector with 1000 entries....

5 years ago | 3 answers | 0

Question

Why is Matlab not setting the RGB colors properly?

I'm trying to change the color settings for my Matlab (R2013A). For example, see this link <http://undocumentedmatlab.com/blog/c...

5 years ago | 0 answers | 1

Answered

Creating vector plots of wireframe surfaces

Daniel Ennis, the creator of the wireframe package for Matlab, has indicated that this is related to a fundamental problem with ...

Creating vector plots of wireframe surfaces

Daniel Ennis, the creator of the wireframe package for Matlab, has indicated that this is related to a fundamental problem with ...

5 years ago | 0

| accepted

Question

Creating vector plots of wireframe surfaces

The situation is that you'd like to plot a surface mesh using many points, but only wish to display the mesh lines within an und...

5 years ago | 1 answer | 0

Question

Launching a different script than the one you're calling

In LaTeX, it's possible to have the typesetting system compile a root file even if you've called the compiler on a constituent f...

5 years ago | 1 answer | 0

Question

Returning Jacobian in bvp4c/bvp5c

One can call bvp4c using something like this options = bvpset('Stats', 'on', 'RelTol', 1e-4, 'AbsTol', 1e-8); sol = bvp4...

5 years ago | 0 answers | 1

Question

Detect of a plot is loglog

Quick question: Is there a way to detect whether the current figure is a loglog plot? (or regular plot or semilogx, semology)?

6 years ago | 1 answer | 0

Question

A black and white filter for Matlab figures

Creating grayscale images from Matlab figures can be a big pain because you have to scale your colormaps and color limits just r...

7 years ago | 0 answers | 1

Question

How to zoom in on figures within the dock? (2012b)

It is known that some people (including myself) are having trouble doing the basic image operations like zooming in or out when ...

7 years ago | 2 answers | 0

Question

Cool examples of how Matlab is useful

I teach a little side course on using Matlab, and I'd like to show a little demo of how Matlab is used *in research and industry...

7 years ago | 2 answers | 0

Question

Create a figure -exactly- a certain size

Consider the following code: N = 2000; [X,Y] = meshgrid(linspace(0,2*pi,N),linspace(0,2*pi,N)); Z = sin(X+Y); p =...

7 years ago | 1 answer | 0

Question

Very weird bug(?) on latex interpreter

I include a code snippet which colors underneath a sine curve. There is a ylabel with the latex interpreter turned on. Changing ...

8 years ago | 1 answer | 0

Question

How do you stop fsolve?

Suppose I have the following call [x,fval] = fsolve(@myfun,x0) The function which I wish to solve is given by myfun,...

8 years ago | 0 answers | 0

Question

Why does EdgeLighting on patches not work?

I'm trying to create a line on a surface with the EdgeLighting property set to phong (for example). An example code would be ...

8 years ago | 2 answers | 0

Question

Lighting only certain surfaces

I'd like to create a lit sphere, to be placed on an unlit surface. For example, membrane; [x,y,z] = sphere(40); hold o...

8 years ago | 1 answer | 2

Question

Line resolution and crispness

I notice that often when I draw lines in Matlab, the line is not very crisp. Here are two images where this cragginess is appare...

8 years ago | 1 answer | 0

Question

Saving tightly cropped PDFs in Matlab

I'm sure many can empathize with my question: I have a figure that needs to be saved in a pdf format (a) without axes or label...

8 years ago | 1 answer | 0

Question

Plotting contours with additional condition

Let f(z) be a complex function. Suppose I wanted to plot the contours where the imaginary part, imag(f(z)) = 0, but the real par...

8 years ago | 1 answer | 1

Question

Text plots (plotting without figure in command line)

Is there a way (or a package) to plot figures in the Matlab command line without using the figures? For example, upon startup us...

9 years ago | 3 answers | 0

Question

Additional output with fsolve

I'm asking what seems to be an identical question to <http://www.mathworks.com/matlabcentral/newsreader/view_thread/254710 this ...

9 years ago | 2 answers | 1

Question

Area plot with gradient

Suppose that I have a function f(x). You can think of f(x) as strictly positive if it helps. Now, there is a secondary funct...

9 years ago | 1 answer | 0