Beantwortet
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) = ...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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);

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 12 Jahre vor | 2

Beantwortet
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 ...

mehr als 12 Jahre vor | 1

Beantwortet
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...

mehr als 12 Jahre vor | 1

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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(...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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(...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 12 Jahre vor | 1

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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))...

mehr als 12 Jahre vor | 0

Beantwortet
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)))); ...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 1

Beantwortet
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; ...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 1

Beantwortet
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...

mehr als 12 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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'...

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 1

| akzeptiert

Beantwortet
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; ...

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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>

mehr als 12 Jahre vor | 0

Beantwortet
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...

mehr als 12 Jahre vor | 0

Beantwortet
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 ...

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

Mehr laden