Controlling Y-Axis Label Properties on Multi-Axis Plots
For example: x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*exp(-0.5*x).*sin(10*x); [AX,H1,H2] = plotyy(x,y1,x,...

mer än 10 år ago | 0

selecting only the numbers from a string variable
C = regexp(A,'[0-9]','match'); disp(C) So do you need to just display those numbers/return them as a vector

mer än 10 år ago | 1

How to add a property to the handles?
Let me explain it for an edit box(assuming Tag is 1) x = get(handles.edit1,'String'); set(handles.edit1,'String',z); N...

mer än 10 år ago | 0

Click on Subplot and Open it in a "New" Figure
One way of doing this is: Example: h = figure; income = [3.2,4.1,5.0,5.6]; outgo = [2.5,4.0,3.35,4.9]; subplot(2,...

mer än 10 år ago | 0

Handles that were created in the Callback, can be used in the other Callbacks?
Several ways are shared in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.2...

mer än 10 år ago | 0

| accepted

Plotting: How can I remove the axis label and only have it at points of my choice?
If you mean axes Tick Label at end of your code write this, set(gca,'YTickLabel','||||||1.2') set(gca,'XTickLabel','0.0308|...

mer än 10 år ago | 0

my loop dint work as i want
Simply, for i = 1:9 a(i) = randi(10); x(i) = a(i); end x

mer än 10 år ago | 0

Detecting a particular word in a cell vector
see if any(strcmp(M,'MAR')) works for you, if there is MAR it shows 1 else 0 Example: If M = {'MAR' 'POPSIZE' 'OT...

mer än 10 år ago | 0

How to make sure GUI is deleted before generating it again?
Use delete(name of ur gui) command. A way to do it might be to put a new push button & write above command in that push butto...

mer än 10 år ago | 0

using a function in another m file
Just make sure the m-files in which both function & subfunction are in same directory.

mer än 10 år ago | 0

how do you chang RGB Color Space in to the HSI Color Space or YCbCr Color Space ???
In that case use rgbmap = ycbcr2rgb(ycbcrmap) see doc ycbcr2rgb

mer än 10 år ago | 1

how do you chang RGB Color Space in to the HSI Color Space or YCbCr Color Space ???
YCBCR = rgb2ycbcr(RGB) converts the truecolor image RGB to the equivalent image in the YCbCr color space. RGB must be a M-by-N-...

mer än 10 år ago | 1

| accepted

@Pan: Say you hv to save 10 figures, for ii = 1:10 h(ii)=figure; end % Now saving figures for ii = 1:10 saveas(h...

mer än 10 år ago | 0

Do you need your figure to be only in bmp format,if not h=figure; plot(sind(1:360)); saveas(h,'picture','png') % ...

mer än 10 år ago | 0

why this command does not work
Try command: To pause your code at a point try, uiwait; at the point where you want to resume execution of your code ...

mer än 10 år ago | 0

Setting seed in random ('normal')
I do not know about seed you r talking about,but if you want to get same sat of random numbers every time do this, rng('defa...

mer än 10 år ago | 0

Specific Application of a GUI using Guide

mer än 10 år ago | 0

Question

Using repmat command to create cell array
I want to create a cell array with a repeating pattern of rgb colors of size n where n is a variable that is determined on the ...

mer än 10 år ago | 1 answer | 0

### 1

Displaying legend for multiple plots
a=randn(5,50); b=randn(5,50); c=randn(5,50); figure; hold on; for i=1:5 plot(a(i,:),'.-b'); plot(b(i,:)...

mer än 10 år ago | 2

Displaying legend for multiple plots
h = get(gca,'Children'); Then select handles of lines you want to add to legend. Say h(1) is handle of a line in 1st group,...

mer än 10 år ago | 0

| accepted

gui and work space data sharing
If you want to access data that is in base workspace in your gui functions, use v = evalin('base','name of variable u want...

mer än 10 år ago | 4

| accepted

loop for clock in MATLAB
If you just want a loop with only 3 different intervals maybe this crude method can help Clock15=char('12:00','12:15','12:30...

mer än 10 år ago | 0

Question

Creating a cell array of size n
I need a cell array of size n, like if n is 3, I need C = {'red','red','red'} If n is 100, C = {'red','red',.......'...

mer än 10 år ago | 4 answers | 0

### 4

How do I read the value from an individual cell in a matrix
if u want to read from 'i'th cell, data(i); % in ur case shud be suffice. data(i,:); % gives data in ith row

mer än 10 år ago | 0

| accepted

Display warning only if the "if "statement is not satisfied
if ~(qs1==q2 | qs1==q3) 'Not ok' end %If u do not like above 1 do this: if qs1==q2 | qs1==q3 else 'Not ok' end ...

mer än 10 år ago | 0

| accepted

finding the gradient of a graph between two points.
i=find(voltage==3); % this gives index of 3 in voltage vector to calculate corresponding current value at voltage = 3. j=find...

mer än 10 år ago | 0

| accepted

Question

Character array of size n.
How do you create a character array of size n(a variable generated from code).

mer än 10 år ago | 1 answer | 1

### 1

Question

Using assignin command in guide
%The below line is in base workspace C = char('red','red','red'); %The below code is in gui created by guide. a = get...

mer än 10 år ago | 2 answers | 0

### 2

Question

To set default value of slider in gui
I want to set default value of slider in gui created by guide.I've tried this, 1)In gui_OpeningFcn , is set default value by,...

mer än 10 år ago | 1 answer | 0