Réponse apportée
I was given some matlab code. How do I figure out what toolboxes are necessary to run the code?
There might be better and easier ways, but I usually run the code first. If there are some undefined functions, or errors regard...

plus de 10 ans il y a | 0

Réponse apportée
Find sum of max values in matrix subject to constraints
a = [0 0 3 ; 0 7 2 ; 5 0 1 ] ; b = [1 2 3 ; 1 2 100 ; 1 100 100 ] ; [first_max, ind] = max(a(:)); [m1, n1] = ind2sub(s...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to do this operation
A(1:length(A)-13) .* B

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
plotting 100 times in same plot
t = [0 : 40]; % time samples f = 500; % input frequency fs = 8000; % sampling frequency x =...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How can I get a prompt to repeat for a user given input?
Hi, Liz. I think you should use |sprintf|. states = inputdlg('How many states are you going to?'); states = str2num(stat...

plus de 10 ans il y a | 1

Réponse apportée
Running a sum function using a for loop?
function[x]=sum1 (x,a,b) total=0; for k=1:length(x) if x(k) >= a & b >= x(k) total = total + x(k); end ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Write an if statement inside of a while loop to check for a positive, negative, or zero number entered by the user. Stop if the user enters zero.
1. prompt = 'Insert a number: '; x = input(prompt); if x < 0 fprintf('Your input is negative number %f.\n', x);...

plus de 10 ans il y a | 2

Réponse apportée
how to make a geographic map from text files data
Hi, Muhammad. This is not an exact solution to your problem, but this is how you can do it. Firstly, I would create a structure...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Can i record a figure as it is being plotted so that i can send it as an email attachment and viewed by someone who does not have matlab?
Hello. You can save an animated figure using |VideoWriter()| function. For <http://www.mathworks.com/help/matlab/ref/videowriter...

plus de 10 ans il y a | 0

Réponse apportée
How can I get rid of excess "for loop"
This is how you can start. t1 = [500 1000 1500]; t2 = [500 1000 1500]; price = [3 5]; ii = 1:length(t1); % Assumed t...

plus de 10 ans il y a | 1

Réponse apportée
How to filter field data in structure?
a = arrayfun(@(n) s.f2 < 30, length(s.f2)); s = s(a);

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
I have converted the string 04567 to double by using str2double function.But I got the output as 4567.But I need the output as 04567 .How can it be done?
As a string, obviously you can have a leading zero. However, as you convert it to double or number, the leading numeral 0 is los...

plus de 10 ans il y a | 0

Réponse apportée
Can you Help Me ? for LQR and PID
By definition, LQR gives optimal state-feedback law of the dynamic system that minimizes certain quadratic objective function. I...

plus de 10 ans il y a | 0

Réponse apportée
colon operator rounding problem
Try it like this. a=(0:1200)/10; disp(a(20)); disp(a(20)-1.9); isequal(a(20),1.9) Your previous code was n...

plus de 10 ans il y a | 1

| A accepté

Question


Extracting near constant elements from an array
I have a vector |'data(1).IAS'| , which looks like as follows. data(1).IAS ans = 288 294 296 294 ...

plus de 10 ans il y a | 3 réponses | 1

3

réponses

Réponse apportée
If a = 3*3 Matrix then how do I index row 1,2,3 & column 1,3 ?
A(:, [1,3])

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
How can I show in a map a certain value in given its latitude and longitude?
I think the following is what you are asking for. A = [-3.69834356435644 40.3692049504951 55.2800325952722; -5.75910000000...

plus de 10 ans il y a | 1

Réponse apportée
How to delete a row if it doesn't follow a pattern
a = [ 2 5 1; 3 6 2; 3 4 1; 9 4 2; 8 3 1; 3 2 2; 9 5 2; 4 8 1]; % First lets remove 2's in a row ii = 1:2:length(a); b = ...

plus de 10 ans il y a | 0

Réponse apportée
Matrix X.^23 without approximation
What do you mean by without approximation? Are you talking about scientific notations? If so, you can change the format using, ...

plus de 10 ans il y a | 0

Réponse apportée
@ Filtering accelerometer Data
<http://www.mathworks.com/help/dsp/examples/designing-low-pass-fir-filters.html Here> is an example of designing a low pass FIR ...

plus de 10 ans il y a | 0

Réponse apportée
Matlab find an element in matrix
It means your matrix |'x'| does *not* have an element that is equal to |q^2|.

plus de 10 ans il y a | 1

Réponse apportée
Calculate difference from a time series
Hi. Clumsy code but should do the trick. Used vectorized code to avoid loops. % I am assuming your dataset is a matrix A...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
how to write data from a loop to excel file
Io=0.86; Iv=0.43; theta = 0:6:360; % Better use vectorization Imax = Io+Iv+2*cos(theta) * sqrt(Io.*Iv); Imin =...

plus de 10 ans il y a | 0

Réponse apportée
How can I fill with color a odd flower in a cartesian o polar coordinates?
As a matter of fact, you are filling with color. What you are filling are the small polygons as shown in the figure below. <<...

plus de 10 ans il y a | 3

| A accepté

Réponse apportée
how can I make a colored 2D-surface in a polar plot? I want to give some labels to this polar... It is possible?
clc c=input('How many blades are there in the blower?:'); t = 0:.01:2*pi; if mod(c,2)==1 radius = co...

plus de 10 ans il y a | 0

Réponse apportée
How to figure out if an array is ordinary or cell?
tf = iscell(A); if tf == 1 A =cell2mat(A) end

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Nested FOR Loop Help
I don't really understand your code. What is the purpose of the first loop? I think every time it loops ( |i = 1 : numel(nCol...

plus de 10 ans il y a | 0

Réponse apportée
Decimal Degrees to metres
Hi. There are |mercator.m| files available on the <http://www.mathworks.com/matlabcentral/fileexchange/ File Exchange>. Gene...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Is it not possible to set axis globally?
Do you mean by setting the setting axis globally, the figure will have fixed properties for all functions? If so: set(0,...

plus de 10 ans il y a | 4

| A accepté

Réponse apportée
Plot, marker, setting appearance
This question has been asked many times. <http://www.mathworks.com/matlabcentral/answers/57319-controlling-the-spacing-between-m...

plus de 10 ans il y a | 1

| A accepté

Charger plus