回答済み
How can I share image data between callbacks?
Hi Saurabh, This one has a simple solution. Note the call in your first function: handles.pushbutton1 = imread(uigetfile...

10年弱 前 | 0

回答済み
Performing stats on subsections of a matrix
Hi Swisslog, Try this: a = [1 1 1 2 2 4; 3 5 4 7 2 5]; % Pack your matrix contents into a cell array [unqA,~,grps]...

10年弱 前 | 0

| 採用済み

回答済み
Why is my surf animation so slow?
Hi Phil, There are a few things you can do to speed this up. Firstly, the *pause* command will force your loop to sit idle...

10年弱 前 | 0

| 採用済み

回答済み
How do I change Grid Size in R2013a?
Hi Edgar, You can set the *XTick* locations of an axis (or the current one via *gca*) directly: tickValues = min(x):0.1:...

約10年 前 | 1

| 採用済み

回答済み
Contributors metainfo: reputation and more
*Recent news:* ... and *BAM!* Walter hits *25,000*! Congratulations are in order again. It's impressive to see, but depressin...

約10年 前 | 4

回答済み
how to project images on the side walls of a 3D surf plot
Hi Konstantinos, Does this code get you on your way? R = 0:0.1:1; z = cos(-R); % that'd be your current y-f...

約10年 前 | 1

| 採用済み

回答済み
What's on your personal MATLAB to-do list?
A triangulation3d class which would basically inherit the standard triangulation class, but add useful features specifically for...

約10年 前 | 2

質問


What's on your personal MATLAB to-do list?
What MATLAB tools or functions have you been thinking about making but haven't quite gotten around to it? It can be something...

約10年 前 | 6 件の回答 | 2

6

回答

回答済み
Reading lines from a text file and storing them into an array.
Hi Surush, The trick is to put each line in an element of a cell array. Here's some commented code that does what you're t...

約10年 前 | 11

| 採用済み

回答済み
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?...

10年以上 前 | 0

回答済み
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 ...

10年以上 前 | 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(...

10年以上 前 | 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...

10年以上 前 | 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) ...

10年以上 前 | 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...

10年以上 前 | 0

| 採用済み

回答済み
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 ...

10年以上 前 | 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...

10年以上 前 | 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...

10年以上 前 | 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...

10年以上 前 | 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...

10年以上 前 | 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...

10年以上 前 | 1

| 採用済み

回答済み
count of months spanned
Hi Leah, I think you can do this quite nicely as follows: startvecs = datevec(startdates); endvecs = datevec(enddates...

10年以上 前 | 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 |...

10年以上 前 | 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...

10年以上 前 | 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...

10年以上 前 | 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...

11年弱 前 | 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...

11年弱 前 | 1 件の回答 | 0

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

11年弱 前 | 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 =...

11年弱 前 | 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...

11年弱 前 | 0

さらに読み込む