Réponse apportée
How to solve these two problems in Matlab?
Dear Kaimeng, here is code for this: m = input('Input value for m:'); arr = zeros(1, m); for i = 1:m arr(i) = ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to apply the sum function of a factorial equation without using the factorial function
Dear Anj, do you need something like this: i = 1:20; val = sum(2.^i);

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Finding Max Distance between coordinates
Dear Prabs, here is an example code which you can use for this purpose: x = 1:10; % x component of coordinate y = 2:2:20...

plus de 12 ans il y a | 2

Réponse apportée
How would I write a code to solve a system of equations?
Dear Omar, you can solve your system of equations using the following way: t = sym('t%d', [1 2]); q1 = 1.53e-5 * t(1)^4 ...

plus de 12 ans il y a | 1

Réponse apportée
How I can plot the magnitude and phase response oh the function
Dear Helda, here is an example showing amplitude and phase plots of your defined function: t = 1:100; y = 4 * sin(50 * t...

plus de 12 ans il y a | 1

Réponse apportée
12 lead ECG graph problem
Dear Stephen you can do like this: plot(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x7, y7, x8, y8, x9, y9, x10, y10, x...

plus de 12 ans il y a | 0

Réponse apportée
for del=-1:0.5:1, i want to get the index of the value of del being used for that specific iteration . can anyone please tell me a way to do this
Dear Qasim, the index in the 2nd value of del will be 2. You can do like this: count = 1; for del = -1:0.5:1 fprint...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Stairs Command MATLAB Ends
Dear T, I think you can do as follows (If i understood correctly) figure X = linspace(0,4*pi,40); Y = sin(X); stairs(...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
I have a matrix 'a' and i want to calculate the distance from one point to all other points. So really the outcome matrix should have a zero (at the point I have chosen) and should appear as some sort of circle of numbers around that specific point.
Dear Sarwar, following is an example code as you desired: A = rand(5, 5); select_cell = [3 3]; distance = zeros(size(...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
how can i take xls file from the user in gui and use it on the xlsread after in my proggram?
Dear Eraklis, You can do like this (for example, in a callback of a button): [FileName,PathName] = uigetfile({'*.*'; '*.xls...

plus de 12 ans il y a | 1

Réponse apportée
How can I enlarge the font size in program and help?
Dear Hamidreza, You can adjust text properties using text_prop. See following link for more information: <http://www.mathworks.c...

plus de 12 ans il y a | 0

Réponse apportée
Error message confusion, help!
Dear Edward, I tried following and it is working properly: x = 1:10; y = 2:2:20; dP = (100 / (std(y) * (2 * pi)^0.5))...

plus de 12 ans il y a | 0

Réponse apportée
dB scale (log scale) of a polar plot graph
Dear Atarli, Here is the conversion to decibel: result =(((cos(theta)).*(sin((x/2).*sin(theta))/(x/2).*sin(theta)))); ...

plus de 12 ans il y a | 0

Réponse apportée
Two problems regarding for loops
Dear Paul, Here is the solution for your task (2): x = 1:10; y = x; y2(1:2:9) = y(1:2:9) + 0.25; y2(2:2:10) = y...

plus de 12 ans il y a | 1

Réponse apportée
Polar Plotting Aperture Antennas in E and H plane
Dear Atarli, here is the code for your equations if I understood correctly: theta = 0.01:0.01:2 * pi; a = 1; b = 1; ...

plus de 12 ans il y a | 0

Réponse apportée
when i try to read number of images from a file in to a program using the "cell" matlab is showing error? Pleasing help me with reading number of images from a file into a single program !!
Dear Vijay, here is correction in your code: n = 2; images = cell(1,n); for i=1:n images{i} = imread(strcat('f...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How can I read in rows from an Excel spreadsheet iteratively?
Dear Jon, You can read excel file iteratively using for loop as follows: count = 1; n = 1888; increment = 10; for ...

plus de 12 ans il y a | 0

Réponse apportée
How can I interpolate a vector into a shorter one?
In case that you want to make longer vector shorter you can use some manipulation(For example I call it forward manipulation). F...

plus de 12 ans il y a | 0

Réponse apportée
Displaying least assigned value
Dear Taimur Saleem, Here is the code which do it: var1 = 6; var2 = 1; difference = mod((var1 - var2),3); if di...

plus de 12 ans il y a | 0

Réponse apportée
where is fitglm function in statistic Toolbox of 2013a
Dear Bassam, Use "ver" at command window to check whether you have statistics Toolbox installed or not. If it is not installed...

plus de 12 ans il y a | 0

Réponse apportée
How can I isolate data from a large input file?
Dear Rob, here is the solution to your problem: A = [0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 -1 0 0 1]; indx = [1...

plus de 12 ans il y a | 1

Réponse apportée
Missing value: Adding new row of NaN in a time series. Need some twist in code
Dear Khandu, you can insert NaN at missing location as follows: A_matrix = rand(122,20,30); [nmonths, nlat, nlon] = size...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Set listbox with excel content --Attempt to reference field of non-structure array
Dear Manual, I assume that "text" just has one cell then you do like this: [ndata, text, alldata] = xlsread(filename); s...

plus de 12 ans il y a | 0

Réponse apportée
Numerate lines to a text file
Here is an example for your problem: A = rand(100, 3); num = 1:100; B = [num' A]; disp(B) dlmwrite('filename.txt'...

plus de 12 ans il y a | 0

Réponse apportée
how to read a text file and read it line by line?
Dear Behrad, here is the complete code for your problem: fid = fopen(filename); % Insert here the file name with complete f...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
devi method of finding root
Dear Unhappy, here is the solution if I understood your problem correctly: syms a_sym b_sym x_sym = a_sym + 1j * b_sym; ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How can i do fast Fourier transform for matrix of images with Matlab?
You can use "fft" function. See for more information: <http://www.mathworks.com/help/matlab/ref/fft.html>

plus de 12 ans il y a | 0

Réponse apportée
How to create a Contour plot?
Dear Ashley, in order to create contour plot you need to have Z as a matrix not as a vector. Also if you have X and Y vectors of...

plus de 12 ans il y a | 0

Réponse apportée
Plotting a Piecewise function
Dear Lauren, do you need following functionality in your code: j = 1:56; t = zeros(1, length(j)); for i = 1:56 ...

plus de 12 ans il y a | 0

Réponse apportée
multiple arguments in function
Dear Parul, You can use "varargout" for any number of output arguments. So in your case function [varargout] = train() ...

plus de 12 ans il y a | 0

| A accepté

Charger plus