Answered
How to get data from figures produced by errorbars?
%example data X = 0:pi/10:pi; Y = sin(X); E = std(Y)*ones(size(X)); errorbar(X,Y,E) %get data xData = g...

15 years ago | 1

| accepted

Answered
Matlab GUI connect with another function
On the OpeningFcn of your gui tag the textbox set(handles.text3, 'Tag', 'myGUItxt3') Now to change the string of that...

15 years ago | 0

| accepted

Answered
Sum of Digits
a=[1 9 11 3 7 8 14] a(a>9)=a(a>9)-9 Edit: Like John said the code fails for numbers bigger than 18 and we can repeat the pr...

15 years ago | 1

| accepted

Answered
String handling questions
set_param(['Model_Name/K(' num2str(i) ')'], 'Value', 'data')

15 years ago | 0

Answered
How to vectorize vector indexing?
a=[1 2 3 4; 5 6 7 8; 9 10 11 12]; v=[2 3 1]; diag(a(1:end,v)) Another way arrayfun(@(x,y)a(x,y),1:...

15 years ago | 1

Answered
Plot two graphs in one scope
Try exporting to workspace and join both data simulations in a cell like this: data = {run1, run2}; simplot(data)

15 years ago | 0

Answered
Storing values in a matrix from 2 for loops
P=100; E=1.5*10^6; b=3.375; d=1.5; I=(1/12)*b*d^3; L=20; a=10; y11=[]; y21=[]; for x1=0:.2:a y1=((-P*x...

15 years ago | 1

Answered
inserting headers into a vector
v is your vector, val is just a number insert column in the first index v=[val v] insert column in the last index v=[v v...

15 years ago | 0

Answered
Sum and average even numbers
)05:2:2(mus

15 years ago | 2

Answered
passing data into another gui figure window using guide
<http://blogs.mathworks.com/videos/2010/02/12/advanced-getting-an-output-from-a-guide-gui/ Advanced: Getting an output from a GU...

15 years ago | 0

Answered
Update GUI text box from SimuLink output
<http://www.mathworks.com/matlabcentral/fileexchange/24294-simulink-signal-viewing-using-event-listeners-and-a-matlab-ui Simulin...

15 years ago | 2

Answered
get plotyy second axis handle
AX=findall(0,'type','axes'); AX(2) %what you are looking for?!

15 years ago | 1

| accepted

Answered
Removing certain frequency component
You need to use a filter, take a look at <http://www.aquaphoenix.com/lecture/matlab10/page4.html this>

15 years ago | 1

Answered
Confused: GUI / figure /
It's the Command-line accessibility option, if you are using GUIDE go to GUI options and change it if you want, by default only ...

15 years ago | 1

Answered
How to write such a matrix
m=ones(7,5); A=2;B=3;C=A*B;D=12; m(1,2:end)=B; m(2:end,1)=A; m(2:end,2:end)=D; m(2:3,2)=C; m

15 years ago | 1

Answered
Need help with FOR loop with 3 indexes
a=[]; for i=0:10:100 for j=0:10:100 for k=0:10:100 s=i+j+k; if s==100 ...

15 years ago | 0

Answered
Get data in real time, draw graphics changing in real time.
clf p=plot3(nan,nan,nan); while 1 data(1,1)=ddereq(channel,'mw1311'); % X coordinate data(1,2)=ddereq(channel,'mw1312'...

15 years ago | 0

| accepted

Answered
uicontrol callback 'disp
h = uicontrol('style', 'pushbutton', 'string', 'Hello', 'position',... [20 150 100 70],'callback', 'disp(''Hello World'...

15 years ago | 0

| accepted

Answered
Write a program that calculates sum of the integers numbers
v=2:30; sum(v(~mod(v,2)))

15 years ago | 1

Answered
Return signal to zero - Simulink
<http://www.mathworks.com/help/toolbox/simulink/slref/switch.html Switch> (Signal)--------------------> ...

15 years ago | 0

Answered
How to create a (nxn) matrix with alternating sign
Just for fun, here's how it can be done with loops n=3; %value chosen r=3; %number of rows c=3; %number of columns ...

15 years ago | 2

Answered
Undefined function or method '...' for input arguments of type 'double'.
change the working directory to the folder where you have your code or add the path. Go to the File and choose the Set Path

15 years ago | 2

Answered
Calculating the product of the elements in a certain range of an array?
m is your array x=2; %start row y=4; %end row z=3; %column prod(m(x:y,z)) %compute the product Example z ...

15 years ago | 1

Answered
I need to write a function which prints out prime number between the two arguments.
Add to your function: Prime=Prime(Prime>0); (insert that in your function end) edit primes %execute this for a surprise ;...

15 years ago | 0

Answered
How to change the heaviside function -- and how to use the new function with symbolic objects?
good question, I'm also clueless about why that happens

15 years ago | 0

Answered
MATLAB R11 student version to run on Windows 7
Matlab 2008b 32 bit runs just fine on windows 7 64 bit, so did matlab 2007b 32 bit.

15 years ago | 0

Answered
Creating 4x4 matrix in SIMULINK
You can turn that 3x3 matrix into any matrix, just be creative, edit the Mask (Look Under Mask for the subsystem), make it 4x4 a...

15 years ago | 1

| accepted

Answered
Cross product of two vectors(function)
V1=[v1x,v1y,v1z]; V2=[v2x,v2y,v2z]; Wrong code! you already have V1 and V2 not the other variables. v1x=V1(1);v1y=V1(2);...

15 years ago | 0

| accepted

Answered
zero value of probability
if error==0 error=eps; %or maybe another low value like 1e-5 end P(k,1)= (error/100);

15 years ago | 0

Answered
Warning: Inputs contain values larger than the largest consecutive flint
You got too big integers for the function to be accurate. function warnIfGreatThanLargestFlint(A,B,classCheck) if strcmp(cl...

15 years ago | 0

| accepted

Load more