Answered
problem with my code please !!
Interesting, not sure how matlab 2016 handles this. I am getting a "Matrix dimensions must agree" error, and for good cause. ...

mer än 9 år ago | 0

Answered
4th order Runge kutta with system of coupled 2nd order ode MATLAB need help i do not know where my algorithm gone wrong
Why are you dividing F_W by 20000? What kind of system is this? I think your ODEs are working fine, they are just reeeeeally sl...

mer än 9 år ago | 0

Answered
Plot a graph and its derivatives
You basically have it. The plot function format is "plot(x,y)" though, meaning x coordinates and y coordinates, so your version ...

mer än 9 år ago | 0

Answered
??? subscript indices must either be real positive integers or logicals
I have no problem running this code. You probably have a *variable called ss* somewhere which overshadows the function of the sa...

mer än 9 år ago | 0

Answered
how to deal with changing array name through function in matlab
This is not going to work. The reason is that your variable exists in a different workspace. As soon as you pass into a function...

mer än 9 år ago | 0

Answered
How find the best step for the array.
You need to decide whether you want equidistant steps, or matching numbers. I'm sure I'm missing something, but if you ju...

mer än 9 år ago | 0

| accepted

Answered
Error using load Unable to read file 'templates'. Input cannot be a directory. Error in main (line 75) load templates
Hi This is what the error says: In your script in line 75, you are trying to load "templates". You also have a directory c...

mer än 9 år ago | 0

Answered
How do I refresh the image shown on gui, after a selection is made in the colormap popup menu by the user?
try calling drawnow() after having set the new color.

mer än 9 år ago | 0

| accepted

Answered
How to go back a time step and recalculate it again in Simulink
How are you checking it at the moment? Maybe this would work: The integrators in simulink have an inbuilt "condition check...

mer än 9 år ago | 0

Answered
Why doesn't the color vector work here?
Try grey=[1 1 1]*0.8; % grid colour

mer än 9 år ago | 0

| accepted

Answered
I dont know how to fix MILP error
I'm afraid so, yes. Two main points: 1. The function to minimize has to be linear one (hence the name linear program) and has...

mer än 9 år ago | 0

Answered
Error using ode15s - Not enough input arguments.
Hi ode15s, like all Matlab ode functions, requires the function to be of the form y' = f(t,y). Your function f_ASM has 3 para...

mer än 9 år ago | 0

Answered
Butterworth filtering with bandpass and 3. order
You understood the documentation correctly. Intuitively, bandpass and bandstop filters are symmetric around their cutoff freq...

mer än 9 år ago | 0

Answered
How to perform matrix pencil operations on matlab? Is there a toolbox or a function?
Do you just need to evaluate a matrix pencil? You can just write your own little function. Let's say you want to compute the ...

mer än 9 år ago | 0

Answered
Inverse distance weighting on scatter data sets in matlab
I think you should ask yourself first why you want to use this method. What does the method do? What are it's advantages / disad...

mer än 9 år ago | 1

| accepted

Answered
Percentage of Days out of 21
Since matlab allows using logicals as integers, you can just count the number of (entries > 0) and divide it by the length of th...

mer än 9 år ago | 0

Answered
how to plot m(t)=cos(2*pi*9*t) 0<t<3 and m(t)=0 otherwise
You can use logical vectors to select certain parts of a vector. t = -1:0.01:4; m = zeros(length(t),1); ind_interest ...

mer än 9 år ago | 0

Answered
manipulation d'une matrice
I'm afraid your chances for an answer are probably quite slim if you pose the question in French. I will answer in English for e...

mer än 9 år ago | 0

| accepted

Answered
Binary sequence from a vector to a variable
But a IS the binary sequence save in a variable? If you want to transform this into some decimal representation of the same digi...

mer än 9 år ago | 0

Answered
Is there a built-in GUI for PCA (Principal Componente Analysis)?
There is a PCA option in the "Classification Learner" App.

mer än 9 år ago | 0

Answered
How do i pass atrendline through zero?
You need to set up your regression accordingly. If you don't want a y offset, you could just normalize your data, i.e. remove th...

mer än 9 år ago | 0

Answered
what command can I use to draw the flux lines?
You can use _quiver_ to plot vector fields.

mer än 9 år ago | 0

Answered
How i can simulate a mass-spring-damper system with variable mass?
You should be able to include the changing mass either in the function, or then through odeset, but I am not sure if you did it ...

mer än 9 år ago | 0

Answered
How do I perform a mathematical operation on the data and the axis of a .*fig, such as re-scaling?
For plotting, Matlab displays everything according to data points, i.e. it doesn't anything about the underlying function. It yo...

mer än 9 år ago | 0

Answered
Problems animating a surf plot.
The code runs without error. I was not quite sure what you were trying to plot in 3D. I mean, you have one nx x nt matrix. If y...

mer än 9 år ago | 1

| accepted

Answered
How can i optimize my code without a for-loop ?
How about this? With 100k rows, I get old version: 0.90 s new version: 0.01 s m = [0 0 m0]; %m0 is a constant R_rec = ...

mer än 9 år ago | 0

| accepted

Answered
How can I plus two or more strings?
Version 1: You can concatenate two strings like matrix elements, i.e. str1 = 'Person A '; str2 = 'Person B '; str ...

mer än 9 år ago | 0

Answered
Help plotting two lines on same graph
Call "hold on" after the first plot. Also, you could use the "line" function instead of "plot" here if you like.

mer än 9 år ago | 0

| accepted

Answered
Im trying to create a code that will create a matrix with gaps depending on the input sequences
Hi Do you need P1 and P2? Or only W? Otherwise, I believe this would do the trick: beam=15; gap=10; N=10; total_ga...

mer än 9 år ago | 0

| accepted

Answered
Isit possible to plot a graph with a contant variable?
Of course. Matlab simply needs to know where to "put the dots", it does not really know what the function "looks like". Be aw...

mer än 9 år ago | 0

| accepted

Load more