Risposto
Im lost sum1 help me with the code, im new to this Matlab programming
Dear Merapelo, you can do it like this: width = input('Enter width of rectangle (value should be positive and greater than ...

oltre 10 anni fa | 0

Risposto
how to perform matrix manipulation for a game of battle ship?
roshan try this: Board = zeros(10); ALPHArange = 'A':'J'; Drow = ALPHArange(randi(numel(ALPHArange))); Dcol = randi(9,1,...

oltre 10 anni fa | 0

| accettato

Risposto
i need some help on matrix operations!
do you need something like this: a=[0 1 0 1 1 0 1]; v=[2 3 4 2 6 1 8]; for i = 1:numel(a) sum = 0; for j ...

oltre 10 anni fa | 0

| accettato

Risposto
help with teachers code?
x{ii}(:,1:(ii-1)) =minInt(:,1:(ii-1)) this line of code is accessing all rows values for columns 1 to ii-1 and then saving...

oltre 10 anni fa | 0

Risposto
Plot in real time
Dear Jerry try this: A = 3.3; W = 6.28; for t = 0:0.01:2 y = A * sin(W * t); plot(t, y, 'g*'), hold on drawnow; ...

oltre 10 anni fa | 0

Risposto
How to assign discrete values in a single matrix by considering four conditions
you can do it as follows: A = rand(10); A(A > 0.75) = 3; A(A > 0.5 & A < 0.75) = 2; A(A > 0.25 & A < 0.5) = 1; A(A < 0....

oltre 10 anni fa | 0

| accettato

Risposto
Creating matrices automatically WITH FOR LOOP
Dear Selman, you can use: A{i} = [i; i + 1] Here A will be a cell array whose each element will be your desired matrix

oltre 10 anni fa | 2

| accettato

Risposto
is there a function that calculates the no. of rows or cols
Dear mary, use [row, col] = size(a)

oltre 10 anni fa | 0

| accettato

Risposto
How to put this information is a table?
Dear Todd, just do as follows: count = 1; %Number 1 and 2 x0=[42;0;95]; extinct=0; W=zeros(1,200); ...

oltre 10 anni fa | 0

Risposto
How can I use the output of "sprintf" to read the content of a matrix
Dear Saad, if i understood correctly you need to do something like this: c={'USA','EUR','JAP','UK'}; results_USA = rand(...

oltre 10 anni fa | 0

| accettato

Risposto
matrix multiplication issue.. i need the result to be in binary numbers
Dear Mary, you can do it as follow: m = rand(1,4) > 0.5; G = [1 1 1 1 1 0 0 0 1 0 0 0; 0 0 1 1 0 0 0 1 0 1 0 0; 1 1 1 0 ...

oltre 10 anni fa | 0

| accettato

Risposto
cellfunc -multiplication of two cells
Dear Mihnathul, I completely agree with Walter. Your question is not completely clear, however if you really insist to use cellf...

oltre 10 anni fa | 0

Risposto
How can I find values within a range of one column in a two column matrix, and get the value plus the corresponding value in the other column?
Dear MacKanzie, You can do something like this: A = [ 1 6; 2 6; 3 7; 4 7; 5 8; 6 4; 7 2]; a = find(ismember(A(:, 2),...

oltre 10 anni fa | 0

| accettato

Risposto
Why does start up require internet access?
Dear Andy, maybe following links are helpful for you: <http://www.mathworks.de/de/help/matlab/matlab_env/start-matlab-on-wind...

oltre 10 anni fa | 0

Risposto
Symbolic Math Error using diff
Dear Carlas, you can try something like this: x = sym('x%d',[2 1]); A = sym('A%d%d',[2 2]); x1 = diff(x' * A * x, x(...

oltre 10 anni fa | 0

| accettato

Risposto
Using a function that will receive a variable number of values and return using the R equation? - Homework
Dear Nora, you can do something like this: if nargin == 0 error('No input arguments') else sum = 0; ...

oltre 10 anni fa | 0

| accettato

Risposto
How to put a red border area in the graph ?
you can do it as follows: figure(1); fill([x; flipud(x)],[y1; flipud(y2)],'g'), hold on, plot(x, y1, flipud(x), flipu...

oltre 10 anni fa | 1

| accettato

Risposto
how to make a curve smooth ??
Dear Mary, you can use smooth function for this purpose. See the following link for more information: <http://www.mathworks.de/d...

oltre 10 anni fa | 0

Risposto
Correctly sum image values
Dear Andy, try this: avRed = sum(sum(im(xx,yy,1)))/el; avGre = sum(sum(im(xx,yy,2)))/el; avBlu = sum(sum(im(xx,yy,3))...

oltre 10 anni fa | 1

| accettato

Risposto
how to scan a hex file and then search for the required byte and display
Dear Prabhav, you can do it as follows: % Read file in the form of string ID = fopen('filename.txt'); A = textscan(ID...

oltre 10 anni fa | 0

| accettato

Risposto
variables problem , infinite loop
Dear Yasin, you can use round or floor or ceil or format for this purpose. Also don't use con...

oltre 10 anni fa | 0

Risposto
Complex number output vector instead of real output
Dear Nikhil, you can use following line of code to see imaginary part of Jones vector ImaginaryPartofJr = imag(Jr) and ...

oltre 10 anni fa | 0

| accettato

Risposto
How can I create a joint (2D) histogram of two equally-sized datasets?
Dear Patrick, maybe the following link is helpful for you: <http://blogs.mathworks.com/videos/2010/01/22/advanced-making-a-2d...

oltre 10 anni fa | 0

| accettato

Risposto
Timer in matlab to repeat segments of code every few minutes?
Dear P, you can use pause command or cputime or etime according to your need: See following links for more information: <h...

oltre 10 anni fa | 0

Risposto
How can I add many matrices together, end to end?
Dear Patrick, you can use horzcat See <http://www.mathworks.de/de/help/matlab/ref/horzcat.html> or vertca...

oltre 10 anni fa | 0

| accettato

Risposto
How can I load a set of files ordered by date and time?
Dear Patrick, you can use 'dir' command to get information of all the files in a specific folder as: files = dir('C:\Users\...

oltre 10 anni fa | 0

| accettato

Risposto
Why is that when i change my phase angle, the amplitude changes in sin and cos functions in Matlab?
Dear Nina, values for sin and cos varies between -1 and 1 so when you add two sinusoidal functions(as you are doing) then at som...

oltre 10 anni fa | 0

| accettato

Risposto
Several rows of values in x-axis
Dear Icequeen, The following link will be quite helpful for you: <http://www.mathworks.com/support/solutions/en/data/1-D47WBX...

oltre 10 anni fa | 1

| accettato

Risposto
Switch case with strings?
Dear Shannon, maybe you can do as follows: count = 0; while count < 3 ShapeName = input('Enter shape name: ', 's'...

oltre 10 anni fa | 4

Risposto
Making a generalized script, very new MATLAB user!
Dear Andrew, one way to generalize the code is as follows: syms a n = 20; % Number of variables for function f x = sy...

oltre 10 anni fa | 0

Carica altro