Beantwortet
Uninterrupted segment length?
For a number that has longer digits, I am not sure. However, if it is within acceptable number of digits format long I...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Hi I need help with this problem in MATLAB CODE!
Loop version: function Y = coffee(X) Y = zeros(length(X)-1,1); for i=1:(length(X)-1) if X(i+1) >= X(i) ...

mehr als 7 Jahre vor | 1

| akzeptiert

Frage


Random Question: If MATLAB disappears tomorrow, what would be the immediate effect?
I had a heavy discussion with my colleague the other day about how our lives would change if MATLAB ceases to exist. Since we ar...

mehr als 7 Jahre vor | 0 Antworten | 0

0

Antworten

Beantwortet
How Can i sum same values in an arry untill it change to a diffrent number and sum these aswell
TeamPasses = [26 25 25 25 25 26 26 26 26 25 25 25 25 26 26 26 25 25 25 25 26 26 26 25 25 26 26 26 26 26]; coffee = find(di...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Using an ELSEIF statement under another IF
Here is an example: input = input('Please insert an integer\n'); if input < 10 if input < 5 fprintf('You...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How do I split double-digit elements in a vector into two separate elements?
Simple approach would be: v = [1 18 9 8]; for i = 1 : length(v) new_vec{i} = num2str(v(i)) - '0' end ...

mehr als 7 Jahre vor | 0

Beantwortet
new to matlab simple question
Yes it will, assuming that you have previously defined the values for |a,b,c| obviously. If you write semicolon at the end of...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Help with my program in MATLAB CODE:
coffee = 0; while ~coffee G = input('Please insert the limit number that is greater than 4\n'); if G <= 4 coffee ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How can I repeat question until valid input is entered?
What if you implement it using a |while| loop? %Input clc; clear all; close all; fpc = input('Enter specified compressi...

mehr als 7 Jahre vor | 1

| akzeptiert

Frage


Reading combinations of strings and numbers from a text file
I have a text file of a TLE as shown below. 1 24652U 96063A 96318.74847837 -.00000020 00000-0 00000+0 0 2 24652 ...

mehr als 7 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Generating a random number inside a function decleration
I am trying to solve a first order differential equation using |ode45|. My function declaration is as follows. function dx =...

fast 8 Jahre vor | 4 Antworten | 0

4

Antworten

Beantwortet
How to normalize data.
There are different methods you can use. One is the <http://www.mathworks.com/help/finance/tsmovavg.html moving average>. Howe...

mehr als 8 Jahre vor | 0

Beantwortet
How to plot the graph as function of three variables t=f(x,y,z)
You can use <http://www.mathworks.com/help/matlab/ref/mesh.html mesh> to plot the function. However, I need further details if i...

mehr als 8 Jahre vor | 0

Beantwortet
I need to add numbers in an array using a for loop...plz help
The problem with your code is |sum = sum + i|. Your |i| is defined as |i = 1:b = 1:length(A)|. You are summing the index numbers...

mehr als 8 Jahre vor | 1

Beantwortet
deleting words from a cell array
x={'areach';'aread';'areal';'areality';'arean';'arear';'areasoner';'areaway';'areca';'arecaceae'}; for n = 1 : length(x) ...

mehr als 8 Jahre vor | 0

Beantwortet
simulate dynamic response to a state space differential equation
How about defining your input like this. u = [t <= 1 & t >= 0; zeros(size(t));]; I also have few comments. * I don't ...

mehr als 8 Jahre vor | 0

| akzeptiert

Frage


Plotting a set of unit vectors in 2-D
I am trying to figure out what is the best way to plot a set of unit vectors in 2-D anchored at |(0,0)|. I am defining my rotati...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
Weird discrepancy while plotting solutions of ode systems
Without looking at the code, I don't think it is possible for us to answer your question. Judging from the graphs, I can onl...

mehr als 8 Jahre vor | 0

Frage


Is there any way to import back figures that you initially exported from MATLAB?
I have used the "Copy Figure" on several plots I made on MATLAB and pasted it into Microsoft Word. I have accidentally deleted t...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


Ignoring empty arrays when using arrayfun on a structure?
I have |1x2269| structure with 20 fields called |data|. I am trying to extract with a condition using |arrayfun|. west_eas...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
How to plot part of the data from larger data file?
A = rand(63, 5); sub_A = A(1:21, [1 2]); You can extract the 21 rows of the first two columns like this and proceed with...

mehr als 8 Jahre vor | 0

| akzeptiert

Frage


Is it possible to combine two structures saved in two different .mat files?
I have two structures, both named 'data' with 17 same fields. They are basically measured data of two different dates, and I wou...

mehr als 8 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
Gradient of Substituted Symbolic Variables
It is because your function |f| is not updated. Here is what you need to do. syms x y z f = x^2 + x + y^2 - y; f = su...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Progress/percent complete bar
Take a look at the <http://www.mathworks.com/help/matlab/ref/waitbar.html |waitbar()|>. It displays a figure that shows what per...

mehr als 8 Jahre vor | 1

Beantwortet
Find given element in column 1 with "find" function.
A = [ 1 1 3;1 2 3;1 2 1]; P = find(A(:,1)==1);

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab index (I tried to name a matrix to use in a loop like variables.)
You can use cell arrays to do the task. Simple example is, A{1} = [1 2; 3 4]; for j = 2 : 10; A{j} = A{j-1} * 2; ...

mehr als 8 Jahre vor | 0

Beantwortet
Change Matrix dimension with NaN
One possible solution is to use <http://www.mathworks.com/matlabcentral/fileexchange/22909-padcat |padcat|> function from file e...

mehr als 8 Jahre vor | 0

Beantwortet
How can I convert a variable whose value is double to integer or to float?
z1 = rand(2601,1); int_z1 = int8(z1); I don't really understand what you mean by "float". Are you refering to single-pre...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
how to use matlab image in MS documents
Could you explain what you mean by image? If it is a simple figure (.fig), you can save it as a .JPG (.JPEG) format and insert t...

mehr als 8 Jahre vor | 0

Beantwortet
How to delete workspace empty variables
a=who; for var=1:length(a) b=eval([a{var}]); if isempty(b) eval(['clear ' a{var} ';']) end en...

mehr als 8 Jahre vor | 1

Mehr laden