Community Profile

photo

Askic V


Last seen: Today 2022 年からアクティブ

Professional Interests:

Statistics

  • 3 Month Streak
  • Knowledgeable Level 4
  • First Answer
  • Thankful Level 3

バッジを表示

Content Feed

表示方法

回答済み
For loop to find roots
Yes, if V contains paramters, then the could would look like this: V = rand(10,1); g = 9.81; z0 = 500; for vi = 1: numel(V) ...

約11時間 前 | 0

回答済み
Unable to fit data properly. For some kind of data the fitting is not proper most of the times
One way to overcome (not 100% guarantee though) this would be the following. If you really have no clue what the coefficient val...

3日 前 | 0

回答済み
ode45 returns a vector of length 0
I see few problems. First have a look at this suggestion: Coefficient alfa is huge, so change in tempearture is very fast, ther...

7日 前 | 1

| 採用済み

回答済み
Str2double gives NaN
I would also like to suggest this solution: X = "3.716,3.711,3.719,3.714,3.714,3.711,3.722,3.712,3.715,3.715,3.717,3.721,3.713,...

8日 前 | 1

回答済み
Str2double gives NaN
Try this: X = "3.716,3.711,3.719,3.714,3.714,3.711,3.722,3.712,3.715,3.715,3.717,3.721,3.713,3.714,0.000"; newStr = split(X,',...

8日 前 | 2

回答済み
How to find first 10 minimum values in a table array?
Another solution is to use readcell function instead of read table. T = readcell('https://in.mathworks.com/matlabcentral/ans...

8日 前 | 0

回答済み
Why do I get "Array indices must be positive integers or logical values" error?
You asked why, and the answer is because of this line: Vc=x(y+z-u-rr) here, x is considered an array and y+z-u-rr is an index....

8日 前 | 0

回答済み
how can we decreases the length of the quiver? so that the tail get smaller but head shouldn't move.
I would do with a different approcah to have more fexibility and control over how vectors would look like. Here is a sample cod...

11日 前 | 0

回答済み
I want to find out how to get the angles between the centroids
Hello Don, I think you might find this example useful: close all clc clear P1 = [231; 84]; P2 = [297; 284]; P3 = [544; 25...

11日 前 | 1

回答済み
How to write this thetta fuction in Matlab? I have an example code in Python
Ok, without going into too much details, let's say you have the following Python functions that you need to rewrite in Matlab. ...

12日 前 | 1

| 採用済み

回答済み
Euler Method for vector function
It appears to me that you want this: clear clc close all % step size h = 0.1; % final time Tf = 5; x = 0:h:Tf; yexact...

12日 前 | 0

回答済み
Matlab Code to calculate total energy consumed in given time.
Energy is just an integral of power over time. You can use cumtrapz function. This is probably what you need: A = xlsread('X_F...

12日 前 | 1

| 採用済み

回答済み
Basic Matlab to python question
This is what you probably want: import numpy as np arr = np.array([1, 2, 3, 4, 5]) arr2 = np.arange(0,10,2) print(arr) ...

12日 前 | 0

回答済み
Unexpected output from simplify()
It is probably because you he a division by vc in your expression. .../(vc^2)... This means simplified expression is valid onl...

13日 前 | 0

| 採用済み

回答済み
How to change element position in matrix?
Please use Matlab built in function called: circshift for example: A=[1;1;0;0;1;0;1] B = circshift(A, [-1, -1])

14日 前 | 0

| 採用済み

回答済み
How to rotate a vector
If you want to reverse elements, then just use flip function. v = 1:10 v_f = flip(v)

14日 前 | 1

| 採用済み

回答済み
How to name axes from the script
I would do ike this: x = linspace(0, 50); y = sin(x); plot(x,y); input_x = input('Enter name for x label:','s'); input_y = ...

15日 前 | 1

| 採用済み

回答済み
Calculate number appearance within a range
Perhaps this code snippet will help you: load TT classes = [1 2 10 20 50 100]; tol = 1e-10; res = zeros(size(diff(classes)...

18日 前 | 0

回答済み
How to remove all for-loops with vectorization?
This code should give you a pretty good idea how to do this: clear clc u=[35 75 -35 -75 0.3 0.5]; b=u; K=length(u)/3;% C...

19日 前 | 0

| 採用済み

回答済み
Defining and plotting a piecewise function of irregular interval
You can try something like this: syms x %makes x a symbolic variable f = piecewise(x>=0 & x<1/4, 1, x>=1/4 & x<1/2, 4*x.^2, x>...

20日 前 | 0

| 採用済み

回答済み
How do I create a function, save it, then run feral on it?
I understand this is homework, but you need to know that feval is not really necessary. Evan matlab suggest that. You can use t...

20日 前 | 1

| 採用済み

回答済み
HOW to convert negative integer to bit in Matlab?
Wel, you can use something like this (assuming you're working strictly with integers): s = -10 b = dec2bin(typecast(int8(s),'u...

約1ヶ月 前 | 0

回答済み
Depth first search algorithm
Use built in function: https://www.mathworks.com/help/matlab/ref/graph.dfsearch.html

約2ヶ月 前 | 1

回答済み
2 axis plot with different markers connected with lines
If you want to have legend only on points 'o' in both red and blue lines, I would do this: %plotting % I want to plot two axi...

約2ヶ月 前 | 0

回答済み
Need to implement a bandpass filter on the ECG signal using matlab
Please have a look at the file exchange. For example: https://www.mathworks.com/matlabcentral/fileexchange/49822-open_ecg-ecg...

約2ヶ月 前 | 0

回答済み
2 axis plot with different markers connected with lines
I would do somthing like this: %plotting % I want to plot two axis with different markers for lambda_r (hollow marker)and alp...

約2ヶ月 前 | 0

| 採用済み

回答済み
Function inside a for loop
For loop will be executed in a matter of milliseconds. On the other hand when you call function once at a time, there is a signi...

約2ヶ月 前 | 1

| 採用済み

回答済み
Precision and indices must be positive integers
The problem is in the line: kd = (Ppeak-0)/(times(end) - t); times is a built in Matlab function for element wise multiplicat...

約2ヶ月 前 | 0

回答済み
What is wrong with my code?
In the line inside the function: term(k) = pi/(12+ k^b); but you didn't send b as an input parameter nor did you define it ins...

約2ヶ月 前 | 0

| 採用済み

回答済み
I can not use i j k as a sym type what should I do
This is how I would solve this problem: c1 = test() function c1 = test() syms x y z k real i = sym('i'); j = sy...

約2ヶ月 前 | 0

さらに読み込む