回答済み

Saving a figure with a textbox

Why not use text? It can still appear outside the axes; x = linspace(0,2*pi); y = sin(x); h = figure; plot(x,y); ...

Saving a figure with a textbox

Why not use text? It can still appear outside the axes; x = linspace(0,2*pi); y = sin(x); h = figure; plot(x,y); ...

10年以上 前 | 1

| 採用済み

回答済み

Summation, Please help i will buy you a cookie :D

Let's break it down into some steps. First consider the problem for a moment; We have the series U(n+1) = U(n)^2, U(1) = 0.5 ...

Summation, Please help i will buy you a cookie :D

Let's break it down into some steps. First consider the problem for a moment; We have the series U(n+1) = U(n)^2, U(1) = 0.5 ...

10年以上 前 | 2

| 採用済み

回答済み

hist() function: Error using .* Error in hist (line 78)

It seems as though hist() prefers floating point values (single or double). Try; hist(double(R(:))) % Histogram of red chan...

hist() function: Error using .* Error in hist (line 78)

It seems as though hist() prefers floating point values (single or double). Try; hist(double(R(:))) % Histogram of red chan...

10年以上 前 | 0

| 採用済み

回答済み

Segmenting an image according a threshold

thresh = 66; I(I < thresh) = 0; I(I > thresh) = 255;

Segmenting an image according a threshold

thresh = 66; I(I < thresh) = 0; I(I > thresh) = 255;

10年以上 前 | 1

回答済み

How can i calculate the largest interval when the elements of an array are larger than a value?

We can find the sequence using find and diff; seq = [0 6 5 2 16 17 16 11 12 14 5 6 9 16 17 18 18 9] thresh = 15 gt = find...

How can i calculate the largest interval when the elements of an array are larger than a value?

We can find the sequence using find and diff; seq = [0 6 5 2 16 17 16 11 12 14 5 6 9 16 17 18 18 9] thresh = 15 gt = find...

11年弱 前 | 0

回答済み

MATLAB Figure file trouble

Since I don't have your full code, I have made two assumptions: # I have changed the button's TAG to "button_capture" # Make...

MATLAB Figure file trouble

Since I don't have your full code, I have made two assumptions: # I have changed the button's TAG to "button_capture" # Make...

11年弱 前 | 0

| 採用済み

回答済み

Pulling .mat files from multiple directories in one function

Windows convention with 'nix file slash...? Anyway... when you call; "load lName" it searches for lName from the current dire...

Pulling .mat files from multiple directories in one function

Windows convention with 'nix file slash...? Anyway... when you call; "load lName" it searches for lName from the current dire...

約11年 前 | 0

回答済み

Why guidata() doesn't work on an user function?

Here's what's going on - guidata updates the handles structure in the function it's called in, but the user function that calls ...

Why guidata() doesn't work on an user function?

Here's what's going on - guidata updates the handles structure in the function it's called in, but the user function that calls ...

11年以上 前 | 4

| 採用済み

回答済み

How to make available initialization variables in workspace

You probably want to set a debug point somewhere in the while loop - either use the debug command or click the tick mark next to...

How to make available initialization variables in workspace

You probably want to set a debug point somewhere in the while loop - either use the debug command or click the tick mark next to...

11年以上 前 | 0

回答済み

how to debug matlab code

<http://www.mathworks.com/help/matlab/ref/dbstop.html dbstop> is the corresponding main matlab debugging command. There are also...

how to debug matlab code

<http://www.mathworks.com/help/matlab/ref/dbstop.html dbstop> is the corresponding main matlab debugging command. There are also...

11年以上 前 | 2

| 採用済み

回答済み

What's missing from MATLAB Central...

1) Github hosts a large number of MATLAB projects, and would be a great place to start if you want to jump into something collab...

What's missing from MATLAB Central...

1) Github hosts a large number of MATLAB projects, and would be a great place to start if you want to jump into something collab...

11年以上 前 | 1

回答済み

code to obtain better curves

If you have the curve-fitting toolbox, smooth might be a good place to start; <http://www.mathworks.com/help/curvefit/smooth.htm...

code to obtain better curves

If you have the curve-fitting toolbox, smooth might be a good place to start; <http://www.mathworks.com/help/curvefit/smooth.htm...

11年以上 前 | 0

回答済み

File handling code for popup menu in gui

You can use the get command; get(handles.mypopup) Or for specific cases; get(handles.mypopup,'string'); % returns a...

File handling code for popup menu in gui

You can use the get command; get(handles.mypopup) Or for specific cases; get(handles.mypopup,'string'); % returns a...

12年弱 前 | 0

回答済み

Setting different values to properties in subplots generated by a function in a plot

Here's some example code using handles; figure subplot(1,2,1); plot(x,y) subplot(1,2,2) h1 = plot(x,z) hold on h2 = p...

Setting different values to properties in subplots generated by a function in a plot

Here's some example code using handles; figure subplot(1,2,1); plot(x,y) subplot(1,2,2) h1 = plot(x,z) hold on h2 = p...

12年弱 前 | 0

回答済み

Question about 'save' option for workspace variable saving

The filename needs to be a string. You can make a string with a variable value in it by using sprintf and providing the variable...

Question about 'save' option for workspace variable saving

The filename needs to be a string. You can make a string with a variable value in it by using sprintf and providing the variable...

12年弱 前 | 0

| 採用済み

回答済み

I want to plot a line over a bar graph that shows a smooth distribution and display the mean, median, and range of the data.

You can use hold on to overlay plots (scaling factors 300, 150, 125 chosen to arbitrarily); A = randn(1000,1); hist(A) ...

I want to plot a line over a bar graph that shows a smooth distribution and display the mean, median, and range of the data.

You can use hold on to overlay plots (scaling factors 300, 150, 125 chosen to arbitrarily); A = randn(1000,1); hist(A) ...

12年弱 前 | 0

| 採用済み

回答済み

How do I get fprintf to display several matrices at once while maintaining the desired order?

My guess would be that this is because MATLAB uses column-major order, you could simply transpose the matrix you are sending to ...

How do I get fprintf to display several matrices at once while maintaining the desired order?

My guess would be that this is because MATLAB uses column-major order, you could simply transpose the matrix you are sending to ...

12年弱 前 | 0

| 採用済み

回答済み

How to put a 3D bar graph besides a gray scale image?

Just saw this in the FeX, it may solve your problem; <http://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors-u...

How to put a 3D bar graph besides a gray scale image?

Just saw this in the FeX, it may solve your problem; <http://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors-u...

12年弱 前 | 1

| 採用済み

回答済み

Matlab Floating point question

Your first one is perhaps not producing the results you expect it to plot(diff(start:endit)/samprate) vs. plot(diff...

Matlab Floating point question

Your first one is perhaps not producing the results you expect it to plot(diff(start:endit)/samprate) vs. plot(diff...

12年弱 前 | 0

回答済み

Import txt file into matlab using programically

The Documentation has rather extensive help for file opening, reading and saving <http://www.mathworks.com/help/techdoc/ref/f16-...

Import txt file into matlab using programically

The Documentation has rather extensive help for file opening, reading and saving <http://www.mathworks.com/help/techdoc/ref/f16-...

12年弱 前 | 1

回答済み

I need to know where should I put a file path. nc to be read by matlab?

Do you mean 'not to be read'? Just put it somewhere that is not included in the MATLAB Path (File -> Set Path). Matlab searches ...

I need to know where should I put a file path. nc to be read by matlab?

Do you mean 'not to be read'? Just put it somewhere that is not included in the MATLAB Path (File -> Set Path). Matlab searches ...

12年弱 前 | 0

回答済み

How to use fittype and fit to get a logarithmic fit to some data

You may need to supply additional parameters to the fyttype object, otherwise it doesn't know what variables it can vary, and wh...

How to use fittype and fit to get a logarithmic fit to some data

You may need to supply additional parameters to the fyttype object, otherwise it doesn't know what variables it can vary, and wh...

12年弱 前 | 0

回答済み

Plotting surf tiles at the center rather than bottom left

It looks like you're using essentially a binary map for the image. I would use imagesc instead, it draws the patch centered at t...

Plotting surf tiles at the center rather than bottom left

It looks like you're using essentially a binary map for the image. I would use imagesc instead, it draws the patch centered at t...

12年弱 前 | 0

回答済み

Sorting the variables in cells

I don't know of a built-in function that sorts cell arrays. I did a similar task awhile ago and had to pull out the data into a ...

Sorting the variables in cells

I don't know of a built-in function that sorts cell arrays. I did a similar task awhile ago and had to pull out the data into a ...

12年弱 前 | 0

回答済み

Capture frames from 3D comet plot to make a movie

I had the same problem as you when modifying comet3. I got the movie working, but the process eliminates the immeadiate tail of ...

Capture frames from 3D comet plot to make a movie

I had the same problem as you when modifying comet3. I got the movie working, but the process eliminates the immeadiate tail of ...

12年弱 前 | 0

| 採用済み

回答済み

How can I plot a single graph that is generated from a file that contains various subfiles?

datafiles = dir('datarus*_qsStruc.mat'); nfiles = length(datafiles); % Get plot colors from a colormap mycolors = lin...

How can I plot a single graph that is generated from a file that contains various subfiles?

datafiles = dir('datarus*_qsStruc.mat'); nfiles = length(datafiles); % Get plot colors from a colormap mycolors = lin...

12年弱 前 | 0

回答済み

BWDIST label matrix not returning expected labels

I think you really want the distMap output, which gives you the _distance_ to the nearest non-zero pixel. labelMask gives you...

BWDIST label matrix not returning expected labels

I think you really want the distMap output, which gives you the _distance_ to the nearest non-zero pixel. labelMask gives you...

12年弱 前 | 1

| 採用済み

回答済み

Derivative of vector wrt time vector

A simple brute force numerical derivative would be find the change in x and divide by the change in t; dx = x(2:end) - x(1:...

Derivative of vector wrt time vector

A simple brute force numerical derivative would be find the change in x and divide by the change in t; dx = x(2:end) - x(1:...

12年弱 前 | 4

| 採用済み

回答済み

Load CSV file to matlab and avoiding word written in csv file for data analysis

<http://www.mathworks.com/help/techdoc/ref/importdata.html importdata> does a pretty good job of separating header from file inf...

Load CSV file to matlab and avoiding word written in csv file for data analysis

<http://www.mathworks.com/help/techdoc/ref/importdata.html importdata> does a pretty good job of separating header from file inf...

12年弱 前 | 1

回答済み

Don't understand my error mention

Can you post the code to trapezes - the error message says the problem is in there, you have something like; function Itr=t...

Don't understand my error mention

Can you post the code to trapezes - the error message says the problem is in there, you have something like; function Itr=t...

12年弱 前 | 1