Answered
How to read complex number from a *.csv file?
you can do it as follows: [num, str, raw] = xlsread('filename.csv'); a = str2num(cell2mat(raw));

11 years ago | 0

Answered
find a Nan in column of cell array and delete the row
here is an example which can give you idea how you can do it: a = rand(1152, 4); a(randi(1152, 1, 20), :) = NaN; a = ...

11 years ago | 1

Answered
We want to create a random 20x20 circulant matrix. Please help!
you can do it as follows: a = randi(100, 20, 1); b = []; for i = 1:20 b = [b, a]; a = circshift(a, 1); ...

11 years ago | 0

| accepted

Answered
how to save a cell array to csv file
I basically can't understand you full question because it is in other language. So I can show you a way that you can try to save...

11 years ago | 0

Answered
Need some improvement in the plotting values
Dear Stefan, try this: count = 1; k2 = 0; for i=1:500:4500 if (i<3900) k1 = a(i:i+499,1); ...

11 years ago | 0

Answered
how can I draw this loop ?
try this: a = [48 52 58 73 85 103 135 193 80 42 2 -18 -29 -40 -45 -48]; b = [0 0.2 0.4 0.6 0.7 0.8 0.9 1 0.95 0.9 0.8 0....

11 years ago | 0

| accepted

Answered
I want my code to run continuously.
try to run code again and again it will give you different values from 1 to 3 each time

11 years ago | 0

Answered
How can I implement a simple difference equation and plot the resulting output, all using MATLAB
may be you can try something like this: N = 500; for n = 1:N xValues = sum(randi(10, 1, n) .* (rand(1, n) - 1)); ...

11 years ago | 0

Answered
M-file for exercise!!!
If you want to re-use some operation again and again then function is better and if you just wanted to start writing codes in MA...

11 years ago | 0

Answered
How can I plot an image in matlab. This is giving me a Black png image!
you can do it as follows: URL ='http://structures.wishartlab.com/molecules/HMDB00126/image.png' filename = 'test.png' ...

11 years ago | 0

| accepted

Answered
issue in matrix multiplication
mary you can get desired output as follows: 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 1 0 0 1 0 0 1 0;...

11 years ago | 0

Answered
Subscript indices must either be real positive integers or logicals.
replace line 36 with the following line: z= -t * (8.314 / ( v - 0.1251897785e-3) + (.1209032931 * (1.858281421 - 0.37270464...

11 years ago | 0

| accepted

Answered
How can I add both numbers and text as legend in a plot?
use legend(strcat('Some text', num2str(someValue)))

11 years ago | 12

| accepted

Answered
Plotting data from a .csv file
you can do it as follows: Array=csvread('filename.csv'); col1 = Array(:, 1); col2 = Array(:, 2); plot(col1, col2)

11 years ago | 4

| accepted

Answered
Does my 3D surface plot look ok?
may be you can make it look better like this: [X, Y] = meshgrid (-50:0.5:50, 0:0.5:30); TEST1TEMP = X * 9/5 + 32; TES...

11 years ago | 0

| accepted

Answered
How can i create a multivariable function from matrix data?
if you have symbolic toolbox installed then you can do it as follows: A = [150; 200; 300]; p = sym('p%d', [1 numel(A)])...

11 years ago | 0

| accepted

Answered
Averaging brightness/fluorescent intensity in columns (y axis)
just use meanAlongEachColumn = mean(grayImage) it will create an array of mean values. Each value in this row vector wil...

11 years ago | 0

| accepted

Answered
error : Function integration trapezoidal
Maybe following links are helpful for you for this purpose: <http://www.youtube.com/watch?v=qo3AtBoyBdM> <http://www.youtu...

11 years ago | 0

| accepted

Answered
Multiple Labels in an Image
you can store labels for all of your items in a cell array of strings and then you can use this cell array of strings in place o...

11 years ago | 1

| accepted

Answered
How to use a fzero function and subfunctions?
Your code is working but its not giving correct ans because of your initial condition: %Parameters T=250; Tb=340; ...

11 years ago | 0

Answered
How to display a polynomial?
you can do something like this: fprintf('(%d) * x^2 + (%d) * x + %d\n', a, b, c)

11 years ago | 2

| accepted

Answered
Writing a code to find area of polygon
If you have coordinates of the corners in the form of (x1, y1) and (x2, y2) format and also if you like to calculate the area of...

11 years ago | 0

Answered
Rescale an axis in other steps without creating vector
Try this: y = rand(1, 1000); % your data x = linspace(0, 20, numel(y)); % your time series plot(x, y) % your plot of...

11 years ago | 0

Answered
How to get 10 day averaged time series of following time series, which is a time series from 2004-2011. I need 10 dat averaged time series from 2004-2011 in every column. Following is the time series which is day to day time series
Dear Chris Martin, maybe you can try something like this(depending upon your data you will have to make modifications accordingl...

11 years ago | 0

Answered
Rescale an axis in other steps without creating vector
You can control your x-axis by plotting your data against your time as follows: y = rand(1, 1000); % your data x = linsp...

11 years ago | 0

Answered
Replicating values a certain number of times
try this: x = 1:100; % Values to be repeated a = 4; % Number of times each value is repeated b = repmat(x, 4); b =...

11 years ago | 1

Answered
ploting a signal which has different frequency
Dear Faranak, do you need something like this: x = 0:0.01:2 * pi; count = 0; for i = 5:-1:1 y = sin(i * x); ...

11 years ago | 0

Answered
Finding a character in a string?
Dear Johny, try this: hashtag=lower(input('Which hashtag would you like information on?','s')); if isempty(strfind(hasht...

11 years ago | 0

Answered
Sum absolute values in an array from .csv file
did you try S = sum(abs(data2(2,15):data2(1442,15)));

11 years ago | 0

| accepted

Answered
IM STUCK HELP, HOW TO SHOW ALL THE NUMBERS ENTERED IN A LOOP BY THE USER
Dear Merapelo, your code is working perfectly. I just made a few modifications to make output look better: i = 0; pro =...

11 years ago | 0

Load more