已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

| 已接受

已回答
How to do this operation
A(1:length(A)-13) .* B

9 years 前 | 1

| 已接受

已回答
plotting 100 times in same plot
t = [0 : 40]; % time samples f = 500; % input frequency fs = 8000; % sampling frequency x =...

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 1

已回答
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 ...

9 years 前 | 0

| 已接受

已回答
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);...

9 years 前 | 2

已回答
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...

9 years 前 | 1

| 已接受

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 1

已回答
How to filter field data in structure?
a = arrayfun(@(n) s.f2 < 30, length(s.f2)); s = s(a);

9 years 前 | 2

| 已接受

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 1

| 已接受

提问


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

9 years 前 | 3 个回答 | 1

3

个回答

已回答
If a = 3*3 Matrix then how do I index row 1,2,3 & column 1,3 ?
A(:, [1,3])

9 years 前 | 1

| 已接受

已回答
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...

9 years 前 | 1

已回答
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 = ...

9 years 前 | 0

已回答
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, ...

9 years 前 | 0

已回答
@ 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 ...

9 years 前 | 0

已回答
Matlab find an element in matrix
It means your matrix |'x'| does *not* have an element that is equal to |q^2|.

9 years 前 | 1

已回答
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...

9 years 前 | 0

| 已接受

已回答
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 =...

9 years 前 | 0

已回答
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. <<...

9 years 前 | 3

| 已接受

已回答
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...

9 years 前 | 0

已回答
How to figure out if an array is ordinary or cell?
tf = iscell(A); if tf == 1 A =cell2mat(A) end

9 years 前 | 0

| 已接受

已回答
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...

9 years 前 | 0

已回答
Decimal Degrees to metres
Hi. There are |mercator.m| files available on the <http://www.mathworks.com/matlabcentral/fileexchange/ File Exchange>. Gene...

9 years 前 | 0

| 已接受

已回答
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,...

9 years 前 | 4

| 已接受

已回答
Plot, marker, setting appearance
This question has been asked many times. <http://www.mathworks.com/matlabcentral/answers/57319-controlling-the-spacing-between-m...

9 years 前 | 1

| 已接受

加载更多