How can i correct the error in the code?

if true
% q=[q(2*qk)(2*qk)(4*qk)]
end
I am getting the following error
()-indexing must appear last in an index expression.
in the editor its showing Cannot call or access into a temporary array.
how to correct the error

1 comentario

Image Analyst
Image Analyst el 23 de Abr. de 2013
That will not give an error because it's commented out. Please post the actual code, and all of the actual error message - all the red text displayed in the command window.

Iniciar sesión para comentar.

Respuestas (4)

per isakson
per isakson el 23 de Abr. de 2013
What is your intension? I guess
q=[q(2*qk),(2*qk),(4*qk)]

6 comentarios

Pooja
Pooja el 23 de Abr. de 2013
its one step in jpeg 2000 matlab code written in Gonzalvez text book.
Pooja
Pooja el 23 de Abr. de 2013
Jpeg 2000 code is that available with anyone?
per isakson
per isakson el 23 de Abr. de 2013
A search for jpeg2000 in the File Exchange returns a dozen contributions.
Either there is a typo in the text book or there is actually space between the factors; space where I guessed comma, ",".
Pooja
Pooja el 23 de Abr. de 2013
In the text book its given as a space.I tried from the file exchange but not getting output.
per isakson
per isakson el 23 de Abr. de 2013
One can use either space or comma as delimiter. I prefer comma because is more visible.
Does the code of the text book run after you made the correction?

Iniciar sesión para comentar.

Pooja
Pooja el 23 de Abr. de 2013

0 votos

I gave a comma and that error got corrected but its showing more errors.Any way to make it running or is there any running JPEG 2000 available?

14 comentarios

per isakson
per isakson el 23 de Abr. de 2013
The Matlab function, imwrite, can output JPEG2000 files.
"... showing more errors ..." You might have introduced more typing errors. Obviously, I cannot guess.
Pooja
Pooja el 23 de Abr. de 2013
not typing errors the code given in the text has some variables that is not defined.that is the error.is there any way to get an errorless jpeg2000 code.
per isakson
per isakson el 23 de Abr. de 2013
The function, imwrite, includes "errorless" code!
Image Analyst
Image Analyst el 23 de Abr. de 2013
Editada: Image Analyst el 23 de Abr. de 2013
Please don't make an answer to your question. You should keep posting comments to per, not Answers to yourself.
Repeating my comments from above: "That will not give an error because it's commented out. Please post the actual code, and all of the actual error message - all the red text displayed in the command window."
Walter Roberson
Walter Roberson el 23 de Abr. de 2013
I am not aware of any JPEG2000 source written in MATLAB; it is usually written in C or C++ and then called from MATLAB.
I have not seen the Gonzalvez textbook; which title is it? Gonzalvez usually makes a software library available for texts, usually on CD.
Pooja
Pooja el 23 de Abr. de 2013
what actually i am doing is that i am implementing jpeg2000 in matlab.Implementing the steps involved in jpeg2000.
Image Analyst
Image Analyst el 23 de Abr. de 2013
Editada: Image Analyst el 23 de Abr. de 2013
Is there some reason why you're not posting the actual red text error message by copying and pasting, like I've asked for before twice now?
Walter Roberson
Walter Roberson el 23 de Abr. de 2013
JPEG 2000 has a number of patent claims against it, with some of the claimants having given limited patent licenses and some of the claimants still not even having said anything other than "You are violating our patent". As best I can tell it is not possible to get a list of the licenses or the patent claims without purchasing the JPEG 2000 specification and by so doing agreeing to the "click-wrap" licenses.
In the organization I used to work for, it was absolutely completely forbidden to agree to license terms without having had an opportunity to read the license terms. A lot of other organizations have similar principles .
Because of these legal issues it is difficult for people to assist with anything to do with JPEG 2000.
Jan
Jan el 23 de Abr. de 2013
Usually Matlab does not show more errors, because it stops after the first one already. So I suggest to show us the errors or fix them by your own. Please note, that you did not even explain which code you are talking of.
And finally I'm sure, that there is no JPEG2000 tool available, because this format is copyrighted too restrictively.
The code is very lengthy with many functions .Is there any way to give the entire code and rectify my problem.
if true
%
%level shift input and compute wavelet transform
[c,s]=wavefast(x,n,'jpeg9.7');
end
i got an error as "??? Error using ==> wavework at 38
C must be a row vector."
per isakson
per isakson el 23 de Abr. de 2013
That lengthy code, where does it come from? Is there reason to believe there is just a few minor problems?
Experiment with replacing
[c,s]=wavefast(x,n,'jpeg9.7');
with
[c,s]=wavefast(x.',n,'jpeg9.7');
Image Analyst
Image Analyst el 23 de Abr. de 2013
Editada: Image Analyst el 23 de Abr. de 2013
There is no C in the code you posted, nor is there a wavework(). Should I ask a fourth time for you to post ALL of your error text that appears in the command window in red (not just part of it like you did)? Nah, I think I'll just give up - besides, I don't have the Wavelet Toolbox anyway. If you want to post your code, check out this link: http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Pooja
Pooja el 23 de Abr. de 2013
Sorry.I have submitted the entire file in the file exchange.Its under review.Under the name jpeg2000.

Iniciar sesión para comentar.

Md Muzakkir Quamar
Md Muzakkir Quamar el 19 de Feb. de 2019

0 votos

n=100;
lamda=0.1;
e=randn(n,1);
U12=[Sin(0.1*(1:n)') Sin((0.1+lamda)*(1:n)')]
Y=(Sin(0.1*(1:n)')+e;
R=U12'*U12;
r=U12'*Y;
thetahat=inv(R)*r;
>> learning
Error: File: learning.m Line: 8 Column: 21
Invalid expression. When calling a function or indexing a
variable, use parentheses. Otherwise, check for mismatched
delimiters.
can anyone answer whats the error
khalid khann
khalid khann el 12 de En. de 2021

0 votos

A=-1.04963*10^11
B=8.44865*10^-8
u=1.47895*10^7
t=0.5
x=(-10^(2):100:10^2)
f=u/A.*sech (1./2*sqrt(u/B)*(x-u*t)).^2
plot(x,f)
it show this erro
Error in Untitled (line 7)
plot(x,f)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 23 de Abr. de 2013

Respondida:

el 12 de En. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by