Answered
Alternative to imread of Image processing toolbox
imread is not from Image processing toolbox. You can find it in Matlab

14 years ago | 0

| accepted

Answered
if i want to stop infinite while loop after 30 iteration, so how can i use it in my matlab code?
test=0 while condition & test<=30 %your code test=test+1 end

14 years ago | 0

Answered
not able to calculate mean within the selected range
x1= get(handles.min,'string') % is a string variable. Use instead x1= str2double(get(handles.min,'string')) %the...

14 years ago | 1

| accepted

Answered
creating 3D mesh for some points in space
You can't use mesh with your data. You will need more data. for example x=[2.5 4 6 18 9]; y=[12 3 7.5 1 10]; [X,Y]=mesh...

14 years ago | 1

Answered
how should I add output of both oscillator and plot it?
From your function, you should write dz = zeros(6,1)

14 years ago | 0

| accepted

Answered
One-to-one correspondence anonymous function
P=[10;100;105;700;700]; N=[5;8;4;11;20]; f=@(x) N(find(P==x)); f(700)

14 years ago | 1

| accepted

Answered
managing two variables in sum function
N=10; M=20; ii=1:N for k=1:M som(k)=sum(ii.*cos(ii*k)); end

14 years ago | 1

| accepted

Answered
intillation question, no 64 bit option?
There is no problem, but some functionality the requires a 32 bits OS will not work, like Real Time Windows Target in external m...

14 years ago | 0

| accepted

Answered
Error when inputting function.
Because you did not call your function, you run it as a m-file. Try this d=5; c=1:10; x=100:200; out=nest(d,c,x)

14 years ago | 0

Answered
Error while building a custom AND/OR function and Custom implication functions
Call your function% x=rand(4,5); y=rand(4,5) out = bounded_sum( x , y) % there is no error in your function, maybe it ...

14 years ago | 0

Answered
Naming different Lines And Figures inside a for loop
To save a figure use after the first loop hgsave(gcf,sprintf('fig%d',k3)) For the name line use *text* command

14 years ago | 0

| accepted

Answered
Trying to plot a 3d closed cylinder
To do this you could use cylinder function r=2 [X,Y,Z] = cylinder(r) h=mesh(X,Y,Z,'facecolor',[1 0 0]) For what you ar...

14 years ago | 1

| accepted

Answered
Solve nonlinear complex equations
Use fzero function doc fzero f=@(z)cot(z)*z -(1-z^2*(1+i*z)) z0=i; sol=fzero(f,z0); % the solution is near z0

14 years ago | 0

Answered
find the minimum value
A=magic(5) % Example out=min(A(:)) % No, min function don't allow just inetger help min

14 years ago | 0

| accepted

Answered
GUIDE, help to get around GUI inconsistencies
If your code is not big. rename your m-file, then create a new m-file with your fig-file. Then copy the content of your function...

14 years ago | 0

Answered
changing a fraction to integer !!
fix(a) Other rounding function: help floor help ceil help round

14 years ago | 1

| accepted

Answered
Read different file names using wavread
for k=1:6 filename=sprintf('sound%d.wav',k) s{k}=wavread(filename) end

14 years ago | 0

| accepted

Answered
Plotting a number of Charts in a different figures !
for k3=1:8:104 figure plot(PDD(k3:k3+7,1),PDD(k3:k3+7,2)); %1 st Curve end

14 years ago | 0

| accepted

Answered
How to make my gui editbox update my iterate calculations
In your loop you must add for each edibox something like set(handles.edit1,'string','Vd')

14 years ago | 0

Answered
How to convert a vector of integers to a vector of characters?
a = [0 0 0 0 1 0 0 0 0 1]; y=arrayfun(@(x) cellstr(num2str(x)),a) % To get any character y{4} % for e.g

14 years ago | 1

Answered
How to plot portion of a vector in matlab?
v=1:100 plot(v(40:end))

14 years ago | 1

Answered
How to plot a number of curves on the same plot ?
%Example x=0:0.1:10; y1=sin(x); y2=cos(x) plot(x,y1,'r',x,y2,'g'); legend({'curv1','curv2'}) Look at doc plot

14 years ago | 1

| accepted

Answered
Hi, Can anyone tell me how to find average of three successive values in matlab, i have an array of 200 values
x=rand(201,1); m=mod(numel(x),3) if m>0 x(end+1:end+3-m)=mean(x(end-m+1:end)) end out=mean(reshape(x,3,[]))

14 years ago | 0

Answered
how should i do adaptive tuning of parameter gain "K " mention in the function ?
In your function you can use t to change the value of K K=20-t/2 Your max(tspan ) is |30|, then |K| will change from |20...

14 years ago | 0

| accepted

Answered
how to write this eqn?
X=[x1 x2 x3]' <http://en.wikibooks.org/wiki/MATLAB_Programming/Introduction_to_array_operations>

14 years ago | 0

Answered
how to read the features from for loop?
For k=1:10 im1=imread('yourimage') figure; imshow(im1); im{k}=im1 end

14 years ago | 0

Answered
how to choose LQR
There is no systematic method to choose Q and R. You can start with Q=eye(n) % n: number of states R=eye(m) % m:...

14 years ago | 2

Answered
embedded matlab function error message
Are you sur one of these two expression * |if V==Vold| * |elseif dI/dV~=-I/V| is true for each step?

14 years ago | 0

Answered
Can I use subscript (x_1) to name/label simulink blocks and signals?
Do you mean sprintf('blockname%d',10) %or sprintf('blockname%s','sometext')

14 years ago | 0

Answered
Gettting data from textfile
clear res fid = fopen('yourfile.txt'); line1 = fgetl(fid); res{1}=line1; while ischar(line1) line1 = fgetl(fid); res...

14 years ago | 1

| accepted

Load more