Answered
Exact number of characters in regexp search
Perhaps the following ? str='XX-XXX-XXXX-XX-XXX.ext' expression = '[-]'; [match,~] = regexp(str,expression,'match','split') ...

7 years ago | 0

| accepted

Answered
Find Euclidean distance of next two vectors in an iteration
help pdist

7 years ago | 0

| accepted

Answered
Hello Everyone I am having problem while using rotm2eul command in matlab. It gives an error stating "Undefined function 'rotm2eul' for input arguments of type 'double'." Can anyone help me real quick. Thanks.
Either you don't have Robotics System Toolbox or a valid license for it. >> help rotm2eul 'rotm2eul' requires Robotics System ...

7 years ago | 1

| accepted

Answered
Hi, I have the issue of not enough input arguments but I don't know what my array "u" should be to define in order to run this function properly. Any help would be much appreciated.
Note: The reason for your error was you were running the function file which requires two inputs . In version 2016b or later a s...

7 years ago | 0

| accepted

Answered
Adding vertical line to graph
Save the variable in each iteration and plot it outside the loop , you seem to be overwriting them so finally you try to plot a ...

7 years ago | 1

Answered
How can I choose selected field in a 1X1 struct and export to excel?
Try the fileexhange below: https://www.mathworks.com/matlabcentral/fileexchange/22510-struc2xls

7 years ago | 0

Answered
How to add rows and colums of zero?
A = padarray(A,[abs(size(B,1)-size(A,1)) abs(size(B,2)-size(A,2))],0,'pre') % requires image processing toolbox Gives: A ...

7 years ago | 1

| accepted

Answered
How to convert the daily rainfall mat file of size 129x135x22995 {lon,lat, time(daily)} to monthly cumulative rainfall mat file of size 129x135x756 {lon, lat, time (monthly). Note: 1. [mon= 31 28 31 30 31 30 31 31 30 31 30 31] .
cumsum(yourdata,3) % 3 denotes third dimension Note : No idea what your trying to do , maybe you want to sum the third dimensio...

7 years ago | 0

Answered
Plotting problems, the axis does not match
doc fplot % read it

7 years ago | 0

Answered
The expression to the left of the equals sign is not a valid target for an assignment.
It's always frustrating when a quesion is asked the entire is code is not provided: So the answer is preallocate and index the ...

7 years ago | 0

Answered
Solve non-linear equation with varying value
x=linspace(0,1,101); Result=cell(1,numel(x)); % preallocate for i = 1:numel(x) Result{i}=fzero(@(z) exp(-10*z)-9*exp(-2*z)+(8...

7 years ago | 0

| accepted

Answered
Exporting plot with latex axis using \textsf{} to pdf doesn't work
https://www.mathworks.com/matlabcentral/answers/437512-my-script-is-not-publishing-figures-even-though-i-have-used-snapnow#comme...

7 years ago | 0

Answered
How to define angle in Matlab
I didn‘t understand youe question clearly but help deg2rad help rad2deg help angle

7 years ago | 0

Answered
Warning: Matrix is singular to working precision. HELP
See https://www.mathworks.com/help/matlab/ref/pinv.html#mw_ffa95973-29a2-48a1-adb0-5a4214e0d9cf det(A) % is zero therefore the...

7 years ago | 0

Answered
Error message "Too many output arguments."
It's pretty clear that the function defined has only one output argument whereas you are calling it with two.

7 years ago | 0

Answered
I have a problem with reading .JPG images.
Make sure the file is in the right folder or specify the path of the file, matlab couldn‘t find the file.

7 years ago | 0

| accepted

Answered
How to save values in a specific position+stop output
You need to upload your missing parts of your code to be debugged: volume=fzero(@(V) volume(V,P), fstart); P=5:15; Volume=zer...

7 years ago | 0

Answered
Ploting known points and their values
x1=[4,6,7,2], x2=[3,6,7,2], x3=[5,2,1,6], y=[1,1,2,2] X=[x1;x2;x3]; for i = 1:numel(y) if y(i)==1 figure pl...

7 years ago | 0

Answered
How do I control/view colorbar axis width?
See https://www.mathworks.com/help/matlab/ref/matlab.graphics.illustration.colorbar-properties.html#bt6akfm_sep_shared-LineWidth...

7 years ago | 0

Answered
how to start inbuilt cam for windows 7 using matlab command
https://www.mathworks.com/help/supportpkg/usbwebcams/ug/acquire-images-from-webcams.html https://www.mathworks.com/matlabcentr...

7 years ago | 0

| accepted

Answered
Getting error "Subscript indices must either be real positive integers or logical'
See https://www.mathworks.com/matlabcentral/answers/437735-how-to-replace-nan-values-with-zero#answer_354471 It might happen t...

7 years ago | 1

| accepted

Answered
Plotting error: I am trying to plot the equations and the output should be as shown but its not
Define them as piecewise curves and then plot them.

7 years ago | 0

Answered
Is there a way to start indexing with 0 in MATLAB?
Nope not at all index of matlab starts from 1 always!

7 years ago | 1

| accepted

Answered
Can't understand why does it say "The expression to the left of the equals sign is not a valid target for an assignment."
syms theta1(t) theta2(t) theta3(t) m1=1; m2=1; m3=1; l1=1; l2=1; l3=1; g=9.81; tau1=1; tau2=1; tau3=1; e1= diff(theta1,2)*(...

7 years ago | 1

| accepted

Answered
why the plot command is not plotting negative values?
Use logical indexing : n=-5:20; y=5*ones(size(n)); y((0<n)&(n<=9))=5*n((0<n)&(n<=9))+5; y(n>=9)=10*sqrt(2*(n(n>=9)))+5; plo...

7 years ago | 0

| accepted

Answered
Howto remove complex expressions in syms
When you substitute a number you would also a get a complex number because you multiply with imaginary number i , how would you ...

7 years ago | 0

Answered
Finding theta in [-pi/2,pi/2] instead of [-pi/4,pi/4] using arctan
https://www.mathworks.com/help/matlab/ref/atan2.html#buct8h0-4 - it mentions "In contrast, atan(Y/X) returns results that are li...

7 years ago | 0

| accepted

Answered
Contributors metainfo: reputation and more
Congratulations sir Image Analyst for reaching 50000 reputation points , keep inspiring as always!

7 years ago | 2

Answered
getting double legend for one bar plot while running histc!!
Try this: data=[1.0e+04 * [4.4463 0.0109 0.0034 0.1224 0.0120]; binranges = logspace(-3,4,8); %1e-3:1e2:1e4; [...

7 years ago | 0

Answered
How to make a simulation of double pendulum using runge-kutta 4th order
Just download the file exchange below and adapt it to your needs: https://www.mathworks.com/matlabcentral/fileexchange/29851-ru...

7 years ago | 0

Load more