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

oltre 10 anni fa | 0

Risposto
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 = ...

oltre 10 anni fa | 1

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

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

| accettato

Risposto
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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 12

| accettato

Risposto
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)

oltre 10 anni fa | 4

| accettato

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

oltre 10 anni fa | 0

| accettato

Risposto
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)])...

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 0

| accettato

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

oltre 10 anni fa | 1

| accettato

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 2

| accettato

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

Risposto
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 =...

oltre 10 anni fa | 1

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

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

oltre 10 anni fa | 0

| accettato

Risposto
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 =...

oltre 10 anni fa | 0

Carica altro