Réponse apportée
How do I plot a line with both thick and thin dashes?
Christopher, could it be the plot grid you are talking about? You can turn it on/off using |grid on| and |grid off|. If it is no...

plus de 12 ans il y a | 0

Réponse apportée
ode 45 plot of intermediate vraibles of differential equations
Thayumanavan, after the |ode45| call, compute |P|: [t,x]=ode45(@myfunc,Tspan,X0); P = sqrt(x(:,1) + x(:,2)); plot...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Formatting Sea Level Data
Edu, this should do: ndays = length(data(:,1))/2; ndata = ndays*24; Tdata = data(:,1); Rdata = reshape(data(:,2:en...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
autosave a image of figure
Suryakanth, in the code you are showing the variable |fullFileName| is not defined, which is why you get an error for the comman...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to store the result of each iteration of a forloop into an array MATLAB
Chandra, use v{i,j} = tf([K(i*j)],[T(i*j) one(i*j)], [L(i*j)])

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to use a loop to create a function calculate a numerical estimate of the integral?
Georgia, check out the following: function sol = my_int(f, ablim, n) % function f on the given range, using the left-re...

plus de 12 ans il y a | 1

Réponse apportée
how to merge two vectors
How about: C = B + [A zeros(1,length(B)-length(A))] assuming that by merge you mean add-merge. If it's just about adjust...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Integration function generates different result by a same expression
Tiger, this is because these are indefinite integrals. Solutions to indefinite integrals can differ by a constant. If you make t...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
I am getting error in this code?
Rajasekhar, use f = @(x) cos(x)./x; q = integral(f,0.1,10) There is a problem though with |f| approaching |inf| as yo...

plus de 12 ans il y a | 1

Réponse apportée
expected value of 'exp2' fit for an unavailable data point using available data
Hello Mohammad, you can retrieve the curve fitting parameters using |coeffvalues|, define an anonymous function, and then evalu...

plus de 12 ans il y a | 0

Réponse apportée
How can I convert this circle drawing code as a Function code? thank you
Maitham, check out the following: function my_circ(imageSize, center, radius) % function definition % Create a logi...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
How can I calculate the difference in time (seconds) with datetime?
If you are starting with date strings, use <http://www.mathworks.com/help/matlab/ref/datenum.html |datenum|> to convert dates in...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
refreshdata: stop axis updates
Linford, how about refreshing only the data in the loop using the |set| command: h = surf(X,Y,Z) ... set(h,'ZData',ne...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
hi..i am writing the code for recursive mean separate histogram equalization..i am getting an error called "Undefined function 'averpixcal' for input arguments of type 'double'."when calling the function 'averpixcal'..code is attached for reference
Vishwas, a couple of thoughts: * Comments in MATLAB appear after percent symbols. E.g., |% This is a comment| * Is the code ...

plus de 12 ans il y a | 1

Réponse apportée
How do I find a solution to (x.^2)/2-10*atan(x) using the Newton-Raphson method?
Hana, there are a couple of issues with your code. This should work: function Xs = newtonroot(Xest) imax = 100; Err ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
problem with 'PLOT' while plotting data acquired from NI DAQ Board
Shailendra, |plot| needs to be spelled lower-case: plot(time, data)

plus de 12 ans il y a | 0

Réponse apportée
Why is there an error when I called the function inputting the points
Ehi, you need to define function |f| again in |refine()| to make it work. In other words: function points = refine(x1, x2, ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How do I plot d using Matlab
Use Nt = 1000 t = linspace(0,100,Nt+1) d = 0.005*sin(0.5*pi*t).*cos(0.5*pi*t) plot(t,d) Any reason you are us...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Subplotting many images in one figure
Edu, this should do: for ii = 1:8 file_name = strcat('Point0',num2str(ceil(ii/4)),'Pic',num2str(ii-4*(ii>4)),'_14012...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
is it possible that create a exe. working on computer hasnt installed Matlab ?
Yunus, you need <http://www.mathworks.com/products/compiler/ MATLAB Compiler> (and therefore MATLAB) to create the .exe file. To...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
euclidean distance between two cell.
Thomas, use pdist([reshape(cell2mat(Z1),2,3); reshape(cell2mat(Z2),3,3)]) assumming that |Z1| contains two cells of 1-by...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Plot is zeroed out, how to fix this?
Mike, after initializing |u| to zero you enter the first loop that increments |n| all the way to |N|. Which is why you never ent...

plus de 12 ans il y a | 0

Réponse apportée
How can I read a complex number vector?
André Luiz, this should do: fid = fopen ('VarName4.txt','r'); ii = 1; while ~feof(fid) acorrente(ii, :) = st...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
log scale y-axis for periodogram
Philippe, it is. Use pxx = periodogram(x,window,nfft) plot(10*log10(pxx)) to plot the periodogram.

plus de 12 ans il y a | 0

Réponse apportée
vectorize a loop with product and sum operations
Francesco, use bsxfun(@plus, x'*v, x')

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
a chronometer in GUI
There is an app very much like the one you are looking for on <http://www.mathworks.de/matlabcentral/fileexchange/36365-chronome...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Problem in saving figure
This <http://www.mathworks.com/matlabcentral/answers/100366#answer_109714 answer> illustrates the how-to well. Simply clip the f...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to change the default background color of a Smith Chart to white?
Hello Floyd, yes it can. Insert myfigure = figure('Color',[1 1 1]); % [1 1 1] corresponds to "white" right before |s...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Dynamic Obstacle in matlab environment
I strongly recommend not to "randomize" the position vector since this results in a non-differentiable function. Start with acce...

plus de 12 ans il y a | 1

Réponse apportée
From "Matlab Function" block in Simulink to Workspace in Matlab
Artur, are you referring to the <http://www.mathworks.com/help/simulink/slref/toworkspace.html |simout|> block? That is typicall...

plus de 12 ans il y a | 0

Charger plus