답변 있음
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. ...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

답변 있음
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 ...

8년 초과 전 | 0

답변 있음
??? 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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

답변 있음
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.

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

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

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

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

8년 초과 전 | 0

답변 있음
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 ...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 1

| 수락됨

답변 있음
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...

8년 초과 전 | 0

답변 있음
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 ...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

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

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

답변 있음
what command can I use to draw the flux lines?
You can use _quiver_ to plot vector fields.

8년 초과 전 | 0

답변 있음
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 ...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 1

| 수락됨

답변 있음
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 = ...

8년 초과 전 | 0

| 수락됨

답변 있음
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 ...

8년 초과 전 | 0

답변 있음
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.

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

| 수락됨

더 보기