Risposto

error in working with cell array

hi, transform C into a matrix before concatenating A, B and C in result: C = cell2mat(C); result={A; B; C}; mydat...

error in working with cell array

hi, transform C into a matrix before concatenating A, B and C in result: C = cell2mat(C); result={A; B; C}; mydat...

circa 8 anni fa | 0

Risposto

How to replace data in a matrix by comparing from another matrix?

for k=1:length(B) x = A(:,1)==B(k,1); B(k,2) = A(x,2); end B = 1 5 ...

How to replace data in a matrix by comparing from another matrix?

for k=1:length(B) x = A(:,1)==B(k,1); B(k,2) = A(x,2); end B = 1 5 ...

circa 8 anni fa | 1

| accettato

Risposto

How do I loop through incrementally changing values

alpha = 1:0.5:20; a = 0.1+3*10^-3 * alpha.^2; b = 0.2+0.1*alpha - (3*10^-3)*(alpha.^2); c = 1./tan(-a./b); % I don't ...

How do I loop through incrementally changing values

alpha = 1:0.5:20; a = 0.1+3*10^-3 * alpha.^2; b = 0.2+0.1*alpha - (3*10^-3)*(alpha.^2); c = 1./tan(-a./b); % I don't ...

circa 8 anni fa | 0

Risposto

Good way to import data file

I'm sure this might be shorter, but I guess it'll be a valid solution for you: fid = fopen('your_file_name_here.txt'); ...

Good way to import data file

I'm sure this might be shorter, but I guess it'll be a valid solution for you: fid = fopen('your_file_name_here.txt'); ...

circa 8 anni fa | 0

Risposto

how to select particular cell in the cell array and particular column in that cell array

You have to add new values to old ones: % initialize your data (I do it with empty array to make it easy) X0 = []; Y0...

how to select particular cell in the cell array and particular column in that cell array

You have to add new values to old ones: % initialize your data (I do it with empty array to make it easy) X0 = []; Y0...

circa 8 anni fa | 0

Risposto

How do I find the two smallest values in varargin?

function out = two_lowest_values(varargin) a = sort(cell2mat(varargin)); out = a(1)*a(2);

How do I find the two smallest values in varargin?

function out = two_lowest_values(varargin) a = sort(cell2mat(varargin)); out = a(1)*a(2);

circa 8 anni fa | 0

| accettato

Risposto

Using Meshgrid for 3 variables

Make sure the size of d is right: If length(a) = n and length(L) = m, then, you have to have size(d) = [m x n] for example...

Using Meshgrid for 3 variables

Make sure the size of d is right: If length(a) = n and length(L) = m, then, you have to have size(d) = [m x n] for example...

circa 8 anni fa | 0

Risposto

How to find the maximum number of Consecutive dry days over time period?

I way of doing what you need with no need of toolboxes or special functions is this. Obviously, it would be much easier if you...

How to find the maximum number of Consecutive dry days over time period?

I way of doing what you need with no need of toolboxes or special functions is this. Obviously, it would be much easier if you...

circa 8 anni fa | 1

Risposto

Export Matlab Plots into sheet

You can do something like this: Define options to customize the published output as a structure, options_doc_nocode. opt...

Export Matlab Plots into sheet

You can do something like this: Define options to customize the published output as a structure, options_doc_nocode. opt...

circa 8 anni fa | 0

Risposto

C++ to matlab(m-file) without mex

Absolutely, You can: i=10; j=2; option = '02'; str = strcat('XYZ%',option,'d%',option,'d\n'); fprintf(str, ...

C++ to matlab(m-file) without mex

Absolutely, You can: i=10; j=2; option = '02'; str = strcat('XYZ%',option,'d%',option,'d\n'); fprintf(str, ...

circa 8 anni fa | 1

| accettato

Risposto

How can I give the range of membership functions in fuzzy based PI control technique?

Hi Lincy, there is not a straight answer. It all depends on your system. What are the limits of your actuators? Any limitations...

How can I give the range of membership functions in fuzzy based PI control technique?

Hi Lincy, there is not a straight answer. It all depends on your system. What are the limits of your actuators? Any limitations...

circa 8 anni fa | 0

Risposto

How to count here?

If you want to sum over the second column of your cell array untill the value of the cell is equal or greater to 121: Since y...

How to count here?

If you want to sum over the second column of your cell array untill the value of the cell is equal or greater to 121: Since y...

oltre 8 anni fa | 0

Risposto

How to display result in command window in GUI?

Using an _edit_box_ is an option. You have to use the _set_ function. Once you have your _edit_box_, just do something like ...

How to display result in command window in GUI?

Using an _edit_box_ is an option. You have to use the _set_ function. Once you have your _edit_box_, just do something like ...

oltre 8 anni fa | 0

Risposto

What's the sum of the first 556 multiples of 47

% sum of the first 556 multiples of 47? the_multiples = 47*(1:556); the_sum = sum(the_multiples);

What's the sum of the first 556 multiples of 47

% sum of the first 556 multiples of 47? the_multiples = 47*(1:556); the_sum = sum(the_multiples);

oltre 8 anni fa | 0

Risposto

Can we add a variable inside the pause command?

If you read the documentation doc pause you will see that you can add a variable inside the pause command. One exampl...

Can we add a variable inside the pause command?

If you read the documentation doc pause you will see that you can add a variable inside the pause command. One exampl...

oltre 8 anni fa | 0

| accettato

Risposto

Speeding up comparison using strcmp

If you have _getnameidx_ available in your system, you might transform your _device_ to a cell: device_cell = celstr(devi...

Speeding up comparison using strcmp

If you have _getnameidx_ available in your system, you might transform your _device_ to a cell: device_cell = celstr(devi...

oltre 8 anni fa | 1

Risposto

How can I selectively hold on and hold off plots in a polar plot

Then, you have to do this: figure; for i = 1:100 for k=1:i p1 = polar(thetaOne(k),rOne(k),'r+') ...

How can I selectively hold on and hold off plots in a polar plot

Then, you have to do this: figure; for i = 1:100 for k=1:i p1 = polar(thetaOne(k),rOne(k),'r+') ...

oltre 8 anni fa | 0

| accettato

Risposto

how increase a value

re=1:3:254; pe=3:5:256; for sa=L(re:pe,re:pe) % no idea what is _L_ or what you try to do here maxi=max(sa) ...

how increase a value

re=1:3:254; pe=3:5:256; for sa=L(re:pe,re:pe) % no idea what is _L_ or what you try to do here maxi=max(sa) ...

oltre 8 anni fa | 0

| accettato

Risposto

how to close a waitbar under R2014b ?

From documentation: You should call _delete_ to remove a wait bar when you give it a _CloseRequestFcn_, as in the preceding...

how to close a waitbar under R2014b ?

From documentation: You should call _delete_ to remove a wait bar when you give it a _CloseRequestFcn_, as in the preceding...

oltre 8 anni fa | 2

| accettato

Risposto

What is the square symbol in text?

I took a look at your "ARP Bells.txt" file. Why do you look for _Aiyn_ string? ind = strfind(txt,'Aiyn'); % get index l...

What is the square symbol in text?

I took a look at your "ARP Bells.txt" file. Why do you look for _Aiyn_ string? ind = strfind(txt,'Aiyn'); % get index l...

oltre 8 anni fa | 0

Risposto

Polar Plot Segment/Section/Arc

The _zoom_ command can zoom in and out but does not allow a good interaction with the zoomed region. Instead, you might play ...

Polar Plot Segment/Section/Arc

The _zoom_ command can zoom in and out but does not allow a good interaction with the zoomed region. Instead, you might play ...

oltre 8 anni fa | 0

| accettato

Risposto

Cell contents reference from a non-cell array object ERROR

Ed{j} is the content of element _j_ within cell array _Ed_, and you are trying to assign that value to the cell array itself _Ed...

Cell contents reference from a non-cell array object ERROR

Ed{j} is the content of element _j_ within cell array _Ed_, and you are trying to assign that value to the cell array itself _Ed...

oltre 8 anni fa | 0

Risposto

How to Pass String to System Call

Use _horzcat_ instead of _strcat_. _horzcat_ keeps the blank spaces. help horzcat

How to Pass String to System Call

Use _horzcat_ instead of _strcat_. _horzcat_ keeps the blank spaces. help horzcat

oltre 8 anni fa | 0

Risposto

What is the equation for this graph?

I give you the first section and you extend it along the x-axis x = 0:0.001:0.04; y = (800.*x-4).*(x>=0 & x<0.01) + ...

What is the equation for this graph?

I give you the first section and you extend it along the x-axis x = 0:0.001:0.04; y = (800.*x-4).*(x>=0 & x<0.01) + ...

oltre 8 anni fa | 0

| accettato

Risposto

Error using feature_vec (line 8) Not enough input arguments.

The error is that you are not calling the function with enough arguments. For example, if you call you function _feature_vec_ ...

Error using feature_vec (line 8) Not enough input arguments.

The error is that you are not calling the function with enough arguments. For example, if you call you function _feature_vec_ ...

oltre 8 anni fa | 0

Risposto

Does anyone know how to do this problem

tic lim = 0.3; N=1; while toc<.61 %%%%% a=rand;%whatever your program does here %%%%% ...

Does anyone know how to do this problem

tic lim = 0.3; N=1; while toc<.61 %%%%% a=rand;%whatever your program does here %%%%% ...

oltre 8 anni fa | 0

Risposto

Importing data from excel into matlab

It is difficult to say without the excel sheet, but it could be related with the format of the cell within the sheet. Make sure ...

Importing data from excel into matlab

It is difficult to say without the excel sheet, but it could be related with the format of the cell within the sheet. Make sure ...

oltre 8 anni fa | 1

Risposto

How do I plot multiple lines of the same figure as if they are one?

You can get your results also like this: x = 0:200000; %Calculate first tax bracket y_1 = 0.1 .* x(x < 12000); %Ca...

How do I plot multiple lines of the same figure as if they are one?

You can get your results also like this: x = 0:200000; %Calculate first tax bracket y_1 = 0.1 .* x(x < 12000); %Ca...

oltre 8 anni fa | 0

| accettato

Risposto

Help with 2d random walk

This may be of help: % Initial position x = 0; y = 0; for k = 1:1000 % -1<y<1 and 0<x<5. d...

Help with 2d random walk

This may be of help: % Initial position x = 0; y = 0; for k = 1:1000 % -1<y<1 and 0<x<5. d...

oltre 8 anni fa | 0

Risposto

Compare two matrix and delete the same rows

A= [1 2 3; 4 5 6; 6 7 8]; B= [4 5 7; 1 2 3; 7 6 4; 6 7 8]; Lia = ismember(B,A,'rows'); B_new = B(~Lia,:) ...

Compare two matrix and delete the same rows

A= [1 2 3; 4 5 6; 6 7 8]; B= [4 5 7; 1 2 3; 7 6 4; 6 7 8]; Lia = ismember(B,A,'rows'); B_new = B(~Lia,:) ...

oltre 8 anni fa | 0