Answered
What are the outputs of Sphere?
[n,m]=size(zo) n2=1:ceil(n/2) surf(xo(n2,:),yo(n2,:),zo(n2,:)) %or surf(xo(n2,:),yo(n2,:),-zo(n2,:))

13 years ago | 0

Answered
How do I get both the minimum of a 2D matrix and it's indices?
M=[4 5 6;2 1 4;1 0 5] [min_val,idx]=min(M(:)) [row,col]=ind2sub(size(M),idx)

13 years ago | 15

Answered
How can i find angle with x-axis of a plot in matlab?
p1 = 0.00053537 p2 = -8.1393e-018 p3 = -0.00044699 x=0:0.1:10 y = p1*x.^2 + p2*x + p3 angles=angle(x+j*y)

13 years ago | 2

| accepted

Answered
how can set values to a const mxArray ?
prh{1}='mystr' % Matlab does not allow 0 as index (it must be logical or positive integer) prh{2}=10 Look at <http://www...

13 years ago | 0

Answered
ode45 with an input
tspan=[0:0.1:5] [T,Y] = ode45(@(t,y),test(t,y,b),tspan,y0)

13 years ago | 0

Answered
How can I create my own simlink library?
In simulink editor, click on *File-new-librairie* , then fill your new file with chosen blocks

13 years ago | 0

Answered
Adjustment of axis length in 3D Bar Plot
You can change the size of your figure figure set(gcf,'position',get(0,'ScreenSize'));

13 years ago | 1

Answered
why is there no output?
Maybe, you are not calling your function correctly v=1:10 out=targil(v)

13 years ago | 0

Answered
How do you use the find function to look for 2 different values?
Maybe you are looking for CMJ = find(data(:,2)==2 | data(:,2)==4); In column 2, you can not have 2 and 4 at the same tim...

13 years ago | 0

Answered
How to declear global array and how to use it ?
Example global a a=[1 2 3] a=[a 4 5] Look at concatenation

13 years ago | 1

Answered
how can i solve an equation using the command solve?
syms E ; Ha = 0.0035; Ei = 608.1453; s=solve((Ha*((Ei - E)/(Ei - 1))^(.5)) / (tanh (Ha*((Ei - E)/(Ei - 1))^(.5)))==E)

13 years ago | 1

Answered
Not enough input arguments.
You should use Matlab_assignment_3(0) Your function is called Matlab_assignment_3

13 years ago | 0

Answered
How do I Copy or Import a figure from MATLAB into Word document
Save your figure as jpg format h=plot(t,y) saveas(h,'filename.jpg')

13 years ago | 0

Answered
the input N change in formula input
Lamda=1; c=2; D = @(N) -(2*pi*c/Lamda^2)*N D(5) % for N=5

13 years ago | 0

| accepted

Answered
Attempted to access x(2); index out of bounds because numel(x)=1. But I'm using a matrix?
After one itteration for i=1:4 x = x(i) the length of x becomes equal to 1, then x(2) does not exist

13 years ago | 2

| accepted

Answered
code does gives me an error message if I execute it with F5, but if I mark the full code and press F9, its working
When you select your code then click f9 means your code is executed in the current folder, when you cick f5, it's executed from ...

13 years ago | 0

| accepted

Answered
getting x values by clicking on axes
Click on your plot the add this code x=get(gco,'xdata') y=get(gco,'ydata')

13 years ago | 0

Answered
delete rows based on whether the day is a wednesday or not
You can use idx=find(ismember(dates(:,1:3),'Wed','rows'));

13 years ago | 0

| accepted

Answered
Trying to repeat this for loop
put the loop inside another loop. Can give more details how do you want to repeat this loop? *Edit* d=diff(p(1:100)) re...

13 years ago | 2

Answered
Input undefined in a function describing differential equations
You can not run a <http://www.mathworks.com/help/matlab/ref/function.html function>, you should call it. Look at <http://www....

13 years ago | 0

Answered
Problema con uiopen desde GUIDE
You can use uigetfile [file,folder]=uigetfile('*.mat'); filename=fullfile(folder,file); data=load(filename)

13 years ago | 2

| accepted

Answered
select data from an existing dataset based on the weekday
Example d1=730853 dates=datestr(d1:d1+100,'ddd-mm-yyyy') M=[cellstr(dates) num2cell((1:101)')] M=M(ismember(dates(:,1...

13 years ago | 0

| accepted

Answered
how to output the result as a matrix in GUI, like any nxn matrix???
You can use uitable object

13 years ago | 0

| accepted

Answered
How to realize this vector operation ?
A = [10 11 12]; B = [20 25]; C = [37 37]; D = [49]; E = [57 51 54]; v={A,B,C,D,E} X = [ A C B E D E E A D] a=cellfun(@(...

13 years ago | 0

Answered
How to realize this vector operation ?
A = [10 11 12]; B = [20 25]; C = [37 37]; D = [49]; E = [57 51 54]; X = [ A C B E D E E A D]; v={A,B,C,D,E}; y=zeros(1,...

13 years ago | 0

| accepted

Answered
change scales from the x axis
use [ax,h1,h2]=plotyy(dates,SPX,dates,VIX); set(ax(1),'ycolor','k') set(ax(2),'ycolor','k')

13 years ago | 0

| accepted

Answered
Matlab (Embedded) Function Block sample time
That depends on your embedded function inputs, if they came from a block with sample time, then set those sample time to inherit...

13 years ago | 0

Answered
Add Chars to a Cell Array with numbers
A={'01.01.2012 00:00' '01.01.2012 00:15' '01.01.2012 00:30' '01.01.2012 00:45'} B=[4.0639 1.3358 ...

13 years ago | 0

Answered
concatenating array using cellstr and repmat
str = cellstr(char('This','Orthis')) x = round(rand(10,1))+1 output = [repmat('some text ',10,1) char(str(x))]

13 years ago | 0

| accepted

Load more