Answered
how to read\scan all data of a row present in an array and pick data according to their priority number which is placed in next column of that particular row?
Hello Saira, for this particular case, asumming that priorities go between 1 and 10, this code can work: A = [1.2160, 7; ...

mer än ett år ago | 1

| accepted

Answered
abs function not working in matlab while reading table and cell array
Please have a look at this: help table2array

mer än ett år ago | 0

| accepted

Answered
How to plot frequency spectrum of a piecewise function in matlab?
Hi @Paul, this is a great explanation. I'm not into signal processing and all I know about Fourier transformation I learned at u...

mer än ett år ago | 0

Answered
How to plot frequency spectrum of a piecewise function in matlab?
This how I would do it: %% clear close all % 1/2*(1+cos(pi*t)) syms t y = piecewise(t < -1,0,-1 <= t <= 1,1/2*(1+cos(pi*t)...

mer än ett år ago | 0

Answered
How to plot frequency spectrum of a piecewise function in matlab?
If this is a homework, you will have to show what have you done so far. But here are some useful things. First of all, you need...

mer än ett år ago | 0

Answered
How to convert time series table into an array and save as an excell file?
I think this code could help you: %load('2023_02_16_F300_NSH_Free_NIacc_data_1.mat', 'NI_Data') load(websave('2023_02_16_F300_...

mer än ett år ago | 0

Answered
How can I rearrange an array based on the order indicated by another array?
A(Order)

mer än ett år ago | 1

| accepted

Answered
How to constrain the plot within the limits?
The complete script with modifed myplot function is the following: clear clc close all t =linspace(0, 5); subplot(311); y...

mer än ett år ago | 0

Answered
How to constrain the plot within the limits?
Is this helpflul to you? t =linspace(0, 5); subplot(311); y1 = sin(2*pi*t); y2 = sin(2*pi*t)+0.2*randn(size(t)); myplot(...

mer än ett år ago | 0

| accepted

Answered
how can we find the intersect points of these two plots?
I think this small code snippet can be useful to you in future if you have a bit more general case: x = 0:0.1:5; y_val = 4*x-2...

mer än ett år ago | 1

Answered
i want to read a url in MATLAB through webread function
You need actually to use function webwrite, so you can write a POST request to the web server, and then to examine the response....

mer än ett år ago | 1

| accepted

Answered
Extract cell value based on row contents
Here is one example that should give you an idea how to proceed: A = [1 28 0.718 281 1 31 0.572 256 ...

mer än ett år ago | 1

| accepted

Answered
if statement inside of a Function is working only in certain conditions
I would implement the function in a bit different way: t = -2:0.2:5; v_c = capacitorVoltage(t); plot(t, v_c); xlabel('t');...

mer än ett år ago | 1

Answered
How to sum up a member of a 3D struct for all elements?
Do you really need this (implemented with loops): [d1,d2,d3] = size(gridblock); sum_oipsc = 0; for i = 1:d1 for j = 1:...

mer än ett år ago | 0

Answered
Insert new values in specific position after processing
In such stuations, I would keep track of indices of elements in the original vector, use find function. A = logical([1 0 0 1 1]...

mer än ett år ago | 1

| accepted

Answered
Apply trapezoidal rule to list of data points.
This is probably what you need: x = [0,0.1,0.3,0.5,0.7,0.95,1.2]; y = [1,0.9048,0.7408,0.6065,0.4966,0.3867,0.3012]; % manu...

mer än ett år ago | 0

Answered
How to remove specific numbers from an array?
If you want to remove certain values from the array, please have a look at this simple example: v = randi(10,1,20) % generate 2...

mer än ett år ago | 1

| accepted

Answered
How can I access a nested struct data by indexing of the fields?
One quick and dirty solution that includes very unpopular eval function is given here: Prefixe = ('https://lotus.naturalproduct...

mer än ett år ago | 1

Answered
Robotics System Toolbox - set value of joint positions
I have managed to find the answer on my own question. % this line will create random configuration robotConfig = robot.randomC...

mer än ett år ago | 0

Question


Robotics System Toolbox - set value of joint positions
Hello, here is a code snippet made from Matlab's documentation: dhparams = [0 pi/2 0 0; 0.4318 0 0 ...

mer än ett år ago | 1 answer | 0

1

answer

Answered
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) ...

mer än ett år ago | 0

Answered
Inconsistency in fitting function
One way to overcome (not 100% guarantee though) this would be the following. If you really have no clue what the coefficient val...

mer än ett år ago | 0

Answered
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...

mer än ett år ago | 1

| accepted

Answered
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,...

mer än ett år ago | 1

Answered
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,',...

mer än ett år ago | 2

Answered
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...

mer än ett år ago | 0

Answered
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....

mer än ett år ago | 0

Answered
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...

mer än ett år ago | 0

Answered
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...

mer än ett år ago | 1

Answered
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. ...

mer än ett år ago | 1

| accepted

Load more