답변 있음
Error using surf() with colorbar and title
Hi Christian, try this: opengl('software') figure,surf(magic(99)),colorbar,title('Va') Does that sort it out as well?...

9년 이상 전 | 0

문제를 풀었습니다

Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

9년 이상 전

문제를 풀었습니다

Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

9년 이상 전

문제를 풀었습니다

Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

9년 이상 전

답변 있음
How to execute a function after the value of a property changed? Problems with callback function
If all of the observation of *PMV* is done by the *RB* class itself, so there's actually a better/cleaner way to do what you're ...

9년 이상 전 | 0

답변 있음
find intersection between two data sets
Hi Carlos, try this code: dataset = rand(20,2); zoneXY = rand(1,2); zoneRadius = rand(1); dists = sqrt(sum(bsxfun(...

9년 이상 전 | 0

| 수락됨

답변 있음
Interpolating vectors at specific points
Hi Christopher, here's a solution that does the job. If you can guarantee that you only have one crossing in your vector V, then...

9년 이상 전 | 0

답변 있음
What am I doing wrong with object oriented programming?
Mark, you're almost there. Here's how to "just get it running": methods function q = calculateSin(this, x) ...

9년 이상 전 | 0

| 수락됨

답변 있음
how to calcuate mean with NaN
If you have the Statistics Toolbox, just replace calls to |mean()| with calls to |nanmean()|. If you don't have it, you can d...

9년 이상 전 | 0

| 수락됨

제출됨

unifyMeshNormals
Aligns adjacent faces in a triangulated mesh surface or volume

9년 이상 전 | 다운로드 수: 5 |

답변 있음
2D Contour colormap too dark.
Hi Marc, Got it. The RGB values you're copying in are 8-bit RGB colours of integers ranging from 0 to 255. You're right that ...

9년 이상 전 | 0

| 수락됨

답변 있음
Elevate a single isoline in a contour (2D) plot
Hi Marc, Is this what you're trying to do? [x,y,z] = peaks; z = z*10 figure [c,h] = contour(x,y,z,'LevelStep',2...

9년 이상 전 | 1

| 수락됨

답변 있음
update objects' coordinate of the same plot !!!!!!!!!!!!!!!!!!!
Hi Bolivar, Let's just go with one object first for simplicity: Here's the contents of the *user1* class: classdef us...

9년 이상 전 | 0

답변 있음
How to convert binary image to 2D triangulation?
Geert, here's how I'd do it. Note that I use <http://www.mathworks.com/matlabcentral/fileexchange/30525-isocontour isocontour> f...

9년 이상 전 | 2

| 수락됨

답변 있음
How to convert 2D triangulation to binary image?
Hi Geert, Here's something that does what you want. It's not optimised for speed as it simply iterates naively through triang...

9년 이상 전 | 0

| 수락됨

답변 있음
Plotting 4d data with matrices.
Naty, as per the comment above I can't replicate your exact data, but here's an example that should show you how to make the fig...

9년 이상 전 | 1

| 수락됨

답변 있음
count of months spanned
Hi Leah, I think you can do this quite nicely as follows: startvecs = datevec(startdates); endvecs = datevec(enddates...

9년 이상 전 | 1

| 수락됨

답변 있음
Nested if statement won't execute
Perhaps the value of |i| is never set, or at least never set _in the scope of the loop that you are running_. Perhaps you mean |...

9년 이상 전 | 0

| 수락됨

답변 있음
Errors in solving nonlinear simultaneous equations
You can't plot a simultaneous equation during iterations in that way. If you instead put: options = optimoptions('fsolve...

9년 이상 전 | 1

| 수락됨

답변 있음
Retrieve all data from columns apart from id when using MySQL
Hi Gurvinder, Can I suggest that I think it would be easier for you to simply get _all_ the fields, and then just discard the...

9년 이상 전 | 1

| 수락됨

질문

Equation of a constrained circle
I have a circle with known parameters (x,y,r): x = 37 y = -7 r = 38 I would like to find the parameters of a new c...

10년 이하 전 | 답변 수: 1 | 0

### 1

답변

질문

Convert/decompose formula terms similarly to LinearModel
I'm trying to do something which must be implicitly done inside *LinearModel.predict()*, but I can't seem to get to it. The t...

10년 이하 전 | 답변 수: 1 | 0

### 1

답변

제출됨

Fast morphological reconstruction of large logical masks.
MATLAB's imreconstruct is slow for large 3D logical masks. bwreconstruct is a faster replacement.

10년 이하 전 | 다운로드 수: 1 |

답변 있음
Plotting elements of a matrix versus elements of another
Ryan, does this do what you wanted? X = rand(10,10) Y = X^2 figure, stem(X(:),Y(:)) The (:) operator will basicall...

10년 이하 전 | 1

| 수락됨

답변 있음
Accessing values of fieldnames in a structure without using the fieldnames function
Hi Jess, Use parentheses: S = struct('field1',1,'field2',2) fieldStr = ['fields' num2str(1)] S.(fieldStr) ans =...

10년 이하 전 | 1

| 수락됨

답변 있음
how to use a parameter name list as input for a function?
Skirt, you were very close. You just need to use a cell array: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function out=try...

10년 이하 전 | 0

답변 있음
Sort Group Data Trends
Anthony, here's a solution relevant to my comment above. Note that there are in fact *4* groups: 7k, *8k*, 11k, and 15k. nu...

10년 이하 전 | 1

| 수락됨

답변 있음
square root of sum of squares on portions of cell arrays - Matlab Noob
out5 = {[0;0],[0;-162],[-54;72]} cellfun(@(vec)hypot(vec)*((-2*double(vec(1)<0))+1),out5) or cellfun(@(vec)sqrt(su...

10년 이하 전 | 0

| 수락됨

답변 있음
Comparing strings with and without ' '
Hi Mini, first I'll make some strings myStrings = {'''Word''', 'Word'}; >> myStrings{1} ans = 'Word' >> myStrin...

약 10년 전 | 0

답변 있음
Pixel position of circle on image
Sangeeta, does this answer your question: center = [25 30]; %XY location of circle center radius = 15; matSize = 50; ...

약 10년 전 | 0