Answered
how can i make surface in to solid (volume) ?
Like this: <http://www.mathworks.com/matlabcentral/fileexchange/42876-surf2solid-make-a-solid-volume-from-a-surface-for-3d-print...

12 years ago | 1

Answered
When plotting latitude, how do I make indices appear as actual values? using function pcolor
I'm going to assume that |NH| is a n x 1 vector of latitude values, |level| is a m x 1 vector of pressure levels, and |T_std_DJF...

12 years ago | 0

| accepted

Answered
plot3 two legends in one plot3
I'm not really sure that code does what you think it does... you're looping over the points too many times in your |drawT| funct...

12 years ago | 0

| accepted

Answered
Modelling tide to look for submersion tide
Tides are a bit more complex than just a simple sinusoid. The t_tide toolbox can generate predicted tides at a given location, ...

12 years ago | 0

Answered
plot3 two legends in one plot3
You can't have two legends associated with a single axis using Matlab's legend. However, you can with <http://www.mathworks.com...

12 years ago | 1

Answered
Extract XData and YData from contourm hggroup handle
Do you want to extract the latitude and longitude values, or the projected X/Y coordinates? If the former, the coordinates ...

12 years ago | 0

| accepted

Answered
I want to control the color of a contour plot. I want to assign a specific color to a range of Z values. I will have 4 colors and I want to control the data ranges for these colors.
Like <http://www.mathworks.com/matlabcentral/fileexchange/29638-contourfcmap-filled-contour-plot-with-precise-colormap this>, pe...

12 years ago | 0

| accepted

Answered
Run a loop through multiple matrices
To do the replacement on a single variable, you just need x(x < 0.1 | x > 0.3) = NaN; To apply it to all your variables,...

12 years ago | 0

| accepted

Answered
Problem for creating matrix with loop
Your loop and your example aren't the same, since |A(3:2,:)| is an empty matrix. But I assume you want this: for ii = 1:10...

12 years ago | 0

| accepted

Answered
Why do I get this message : Error using kmeans ---X must have more rows than the number of clusters.
How many data points do you have? And how many clusters are you attempting to create? You can't group 4 points into 5 clusters...

12 years ago | 0

| accepted

Answered
Fastest way to import single column?
It's not a Matlab solution, but I have found that pre-processing in Perl (split columns and spit out a one-column intermediate f...

12 years ago | 0

Answered
Functios in MatLab for matrixes
x = rand(100); n0 = sum(x(:) == 0); n0to1 = sum(x(:) > 0 & x(:) <= 1); ngt1 = sum(x(:) > 1);

12 years ago | 1

| accepted

Answered
How can I surf a non square matrix?
Probably just an aspect ratio issue: data = rand(5,3); % replace with your data pltdata = nan(size(data)+1); pltdata(...

12 years ago | 0

| accepted

Answered
fprintf cell array syntax
Not quite sure why you're attempting to use cell arrays here; the calling structure for fprintf expects the file id, a format st...

12 years ago | 0

| accepted

Answered
Changing xlim & ylim of axes sluggish
Not sure if this is exactly the effect you're going for, but for panning around an image via mouse movement, I've found this fun...

12 years ago | 0

Answered
histc with split intervals
I'd set up separate matrices that hold all the sub-bins (i.e. set of all endpoints) as well as which intervals are composed of w...

12 years ago | 0

Question


Is retina display still an issue in 2014a?
I stopped updating my version of Matlab at R2013a due to the issue with fonts not rendering clearly on a MacBook Pro with Retina...

12 years ago | 2 answers | 0

2

answers

Answered
How can I change the values of a plot inside a loop?
You can set the 'xdata' and 'ydata' properties of the line. You may have to make sure you set your axis limits so they aren't r...

12 years ago | 0

| accepted

Answered
What are the details of the interpolation scheme done in ode45?
The interpolation is done by the ntrp45 function (<matlabroot>/toolbox/matlab/funfun/private/ntrp45.m); you can open that and ex...

12 years ago | 1

| accepted

Answered
Question regarding plotting graph
doc gplot

12 years ago | 0

Answered
How do I index correctly from my questdlg command to my if statement? I am trying to direct the user into different code based on their questdlg responses. I have many more in this code but I am stuck HELP!
Since you know the possible strings in advance, a switch/case block might be better: quest = 'What type of rod are you using...

12 years ago | 0

| accepted

Answered
How to select columns based on a known repeated pattern.
Not quite one shot, but a little less typing: n = size(raw, 2); idx = bsxfun(@plus, (1:22:n)', 28:32); idx = idx(idx ...

12 years ago | 0

Answered
"Meshgrid" in more than 3 dimensions?
doc ndgrid But that's going to be a huge matrix (323902152 elements, ~2.4GB double array); are you sure you want to store th...

12 years ago | 1

Answered
How to convert a matrix of double to int?
It's possible that mrmr_mid_d.m isn't on your path; the other possibility is that it doesn't actually accept integer data types ...

12 years ago | 8

Answered
Plot MarkerSize units normalized
How were you calling the circle-equation version? And how many objects are you plotting? I ran a quick test: ncirc = 10;...

12 years ago | 1

Answered
Draw lines between points
Matlab considers each column passed to plot to represent a separate line segment. So just transpose your data: plot(x1',...

12 years ago | 3

Answered
How to vectorize the for loop
u(j,1,1) = v(j) .* w(j,1,1); The |.*| means element-by-element multiplication; otherwise, it attempts matrix multiplication....

12 years ago | 0

| accepted

Answered
How to add mathematical symbols to text within the legend
The legend command should accept TeX symbols by default, just as titles, x/ylabels, etc: plot(rand(10,1)); hl = legend('4...

12 years ago | 0

| accepted

Answered
pcode always complains "Input argument is undefined."
The documentation is fine. However, the |fun| input is supposed to be the file name: pcode('creditFunc_prod1', '-inplace'...

12 years ago | 0

Answered
How to count how many numbers are odd or even?
nx = 100; x = randi(100,nx,1); % Some example data neven = sum(~rem(x,2)); nodd = nx - neven;

12 years ago | 0

Load more