Answered
How can I make a formula that execute loops but with different values for example Q=mc(To-Ti) where the 'Ti' has different values and the rest are known values?
EDITED you don't need loop: mc=2; To=4; Ti=[5.4900;5.4900;4.8400;4.8400;5.4900;5.4900;8.0900;10.0400;11.9900;13.2900;13.9400...

7 years ago | 0

| accepted

Answered
How to Plot a Graph for a Range of Values
how about this example: (if it doesn't work provide your code and datas) syms x(t) x(t)=t*exp(t-1) fplot(x(t),[0 1]) % rangin...

7 years ago | 0

| accepted

Answered
Adding available capacity at the hourly time increment
have you seen cumsum?

7 years ago | 0

Answered
Extrapolate/Scale with new plot
see interp1() to extrapolate.

7 years ago | 0

Answered
How can i generate random numbers according to a known probability?
https://www.mathworks.com/matlabcentral/answers/39091-random-number-generator-lower-numbers-have-higher-chance#answer_48670

7 years ago | 0

Answered
does simulink onramp work wih 2017b or only 2018b?
with 2018b see https://www.mathworks.com/matlabcentral/answers/425405-how-can-i-start-simulink-onramp#answer_342733

7 years ago | 0

| accepted

Answered
Read points from a txt file
T=readtable('sample.txt'); %see attached file datas=table2array(T); x=datas(:,1) y=datas(:,2)

7 years ago | 0

Answered
How do I stop data being rounded when plotting a graph with 2 y-axis?
Fit the curve using interp1() with the method 'spline' then you should get a perfect curve

7 years ago | 0

Answered
How to plot y = exp^x/sinx 0.7
syms x y=exp(x)/sin(x) + 0.7 fplot(y)

7 years ago | 0

Answered
fifth element in vector
g) hint-> y.^0.5 using https://www.mathworks.com/help/matlab/ref/format.html with https://www.mathworks.com/matlabcentral/answer...

7 years ago | 0

| accepted

Answered
How to split time in to hours, minutes and nanoseconds
see format and adapt whatever is suitable for you format long g %at the very beginning

7 years ago | 1

| accepted

Answered
fitting an equation to the curve
use interp1() with appropriate method: x = linspace(-2*pi,2*pi,100) ; xx=linspace(x(1),x(end),1000); y = sin(x).^7 ; yy=inte...

7 years ago | 0

Answered
am writing a code to add rings on an image but I keep getting a "matrix dimension must agree" erro message, below is the code:
baseFileName = 0.15*baseFileName + 0.85*i.Q; size(baseFileName) and size(i.Q) should be the same to perform the above operati...

7 years ago | 1

Answered
Solving the Ordinary Differential Equation
EDITED use dsolve() or Alternate method using ode45: tspan=[0 1]; y0=[0;0]; [t,x]=ode45(@myod,tspan,y0) plot(t,x) l...

7 years ago | 0

| accepted

Answered
Trying to in do a vector in a for loop
n=input('Enter number of rows: ') m=input('Enter number of column: ') matrix = zeros(n, m); % preallocate your matrix for k...

7 years ago | 0

| accepted

Answered
How to multiply dimension matrix ???
clear all A=rand(220,1)'; %AN EXAMPLE B=rand(220,11); A*B

7 years ago | 1

| accepted

Answered
Please help me to write a MATLAB code for free search krill herd algorithm
https://www.mathworks.com/matlabcentral/answers/232255-please-i-need-krill-herd-algorithms-in-matlab#answer_188147

7 years ago | 0

| accepted

Answered
how to caculated matrix
A=[3+4i -8-6i -5+12i 12-9i]; B=real(A).^2

7 years ago | 0

Answered
Curve fitting (Noise)
Use interp1() with suitable method: x = [0 0.1579 0.3158 0.4737 0.6316 0.7895 0.9474]; f = [-0.3637 0.3164 -1.1263 -1.0672 0.1...

7 years ago | 1

| accepted

Answered
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
It would be great if it‘s possible to edit answers or comments the code like in the old editor(mobile) now it is hard to separat...

7 years ago | 0

Answered
column multiplication by specific number with some condition
r_1=ones(1,numel(r)): r_1(r>0)=r(r>0).*.5; r_1(r<0)=r(r<0).*.7; r_1

7 years ago | 0

Answered
Help with for loop and indexing
I am not sure exactly what you want but it should be with an index x_prime(k) and x_double_prime(k)

7 years ago | 0

Answered
Hi every one, when i run this code,i got error as below,please guide me,
Because you didn‘t define the variable Rz thats what is causing the error , you need to define it first. Also see the another po...

7 years ago | 0

Answered
how to Convert the matrix (the original image) into a vector, plot it in 2D
vector=yourmatrix(:) plot(vector)

7 years ago | 0

Answered
how to count the number of different elements in two matrices
diffelements=sum(a~=b) result=diffelements/numel(a)

7 years ago | 1

| accepted

Answered
Connect matlab script with simulink
https://www.mathworks.com/matlabcentral/answers/56179-how-can-i-give-m-file-output-to-simulink-model-as-input#comment_387516

7 years ago | 0

| accepted

Answered
how to command to generate a those matrix?
see zeros(),eye() and ones

7 years ago | 0

Load more